应急基本信息系统->专业保障机构->运输保障机构信息页面开发(未完成)
parent
c380cd05fb
commit
7d6a7ca474
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<router-view />
|
||||
</template>
|
|
@ -1,386 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;" />
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column label="标题" prop="TITLE" width="180">
|
||||
<template slot-scope="{row}">
|
||||
<span
|
||||
:style="{color:'#0c60e1',cursor: 'pointer'}"
|
||||
@click="goList('casesummary',row.ID,'1')">{{ row.TITLE }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="LEVELNAME" label="事故级别" width="180" />
|
||||
<el-table-column prop="CONTENT" label="内容" show-overflow-tooltip="true" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" width="180" align="center" label="附件" >
|
||||
<template v-if="row.FILE_URL" slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-down" size="mini" @click="download(row)">下载</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-document" size="mini" @click="handleDetail(row)">查看</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.NAME)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<template>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')">删除</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="600px">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
|
||||
|
||||
<el-form-item label="标题" prop="TITLE">
|
||||
<el-input v-model="form.TITLE" placeholder="这里输入标题..." />
|
||||
</el-form-item>
|
||||
<el-form-item label="事故级别" prop="TYPE_DIC_ID">
|
||||
<Treeselect
|
||||
:options="treeData"
|
||||
:normalizer="normalizer"
|
||||
v-model="form.LEVEL"
|
||||
:disable-branch-nodes="true"
|
||||
placeholder="请选择法规"
|
||||
no-options-text="暂无数据"
|
||||
no-children-text="暂无数据"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="CONTENT">
|
||||
<el-input
|
||||
v-model="form.CONTENT"
|
||||
:rows="10"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:on-change="handleEditChange"
|
||||
:on-remove="handleRemove"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
action="#" >
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormEdit = false">取 消</el-button>
|
||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormShow" title="查看" width="800px">
|
||||
<table class="table-ui">
|
||||
<tr>
|
||||
<td class="tbg">标题</td>
|
||||
<td>
|
||||
<div v-html="form.TITLE" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tbg">内容</td>
|
||||
<td>
|
||||
<div v-html="form.CONTENT" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="form.FILE_URL">
|
||||
<td class="tbg">附件</td>
|
||||
<td><a @click="download(form)">下载</a></td>
|
||||
</tr>
|
||||
<tr><td colspan="2" style="text-align: center">案件总结</td></tr>
|
||||
<tbody v-for="item in caseSummaryList" :key="item.ID" >
|
||||
<tr >
|
||||
<td class="tbg">内容</td>
|
||||
<td>
|
||||
<div v-html="item.CONTENT" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="item.FILE_URL">
|
||||
<td class="tbg">附件</td>
|
||||
<td><a @click="download(item)">下载</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormShow = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import { upload } from '@/utils/upload'
|
||||
import { Treeselect } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
export default {
|
||||
components: { Treeselect, Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
total: 0,
|
||||
varList: [],
|
||||
KEYWORDS: '',
|
||||
dialogFormEdit: false,
|
||||
dialogFormShow: false,
|
||||
dialogType: 'add',
|
||||
form: {
|
||||
TITLE: '',
|
||||
CONTENT: '',
|
||||
LEVEL: ''
|
||||
},
|
||||
rules: {
|
||||
TITLE: [
|
||||
{ required: true, message: '类型不能为空', trigger: 'blur' },
|
||||
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }]
|
||||
|
||||
},
|
||||
FFILE: [],
|
||||
caseSummaryList: [],
|
||||
treeData: [],
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.DICTIONARIES_ID,
|
||||
label: node.name,
|
||||
children: node.nodes
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getTreeList()
|
||||
},
|
||||
methods: {
|
||||
getTreeList() {
|
||||
requestFN(
|
||||
'/caseLibrary/listTree',
|
||||
{
|
||||
}
|
||||
).then((data) => {
|
||||
this.treeData = JSON.parse(data.zTreeNodes)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
// 跳转
|
||||
goList(page, CASE_ID, ticketType) {
|
||||
this.$parent.activeName = page
|
||||
this.$parent.CASE_ID = CASE_ID
|
||||
this.$parent.ticketType = ticketType
|
||||
},
|
||||
//* ************************下载**********************
|
||||
download(obj) {
|
||||
this.$confirm('确定要下载此文件吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.downloadUrl = config.fileUrl + obj.FILE_URL
|
||||
const _this = this
|
||||
setTimeout(function() {
|
||||
window.open(_this.downloadUrl)
|
||||
}, 200)
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// **********************文件上传*********************
|
||||
handleEditChange(file) {
|
||||
file.MATERIALS_ID = Math.random()
|
||||
const is5M = file.size / 1024 / 1024 < 5
|
||||
if (is5M) this.FFILE.push(file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.FFILE = fileList
|
||||
},
|
||||
upload(fun) {
|
||||
const formData = new FormData()
|
||||
|
||||
for (let i = 0; i < this.FFILE.length; i++) {
|
||||
if (this.FFILE[i].raw) {
|
||||
formData.append('FFILE', this.FFILE[i].raw)
|
||||
}
|
||||
}
|
||||
upload(
|
||||
'/file/upload',
|
||||
formData
|
||||
).then((data) => {
|
||||
fun(data.fileurl)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
//* *******************列表查询******************************
|
||||
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
name: this.KEYWORDS
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
//* ****************************数据查看*******************************
|
||||
handleDetail(v) {
|
||||
this.dialogFormShow = true
|
||||
this.form = {
|
||||
TITLE: v.TITLE,
|
||||
CONTENT: v.CONTENT,
|
||||
FILE_URL: v.FILE_URL,
|
||||
LEVEL: v.LEVEL
|
||||
}
|
||||
// 查询案件总结列表
|
||||
requestFN(
|
||||
'/caseLibrary/getCaseSummaryList',
|
||||
{
|
||||
id: v.ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.caseSummaryList = data.varList
|
||||
})
|
||||
},
|
||||
//* ***************************数据保存**********************************
|
||||
handleEdit(v) {
|
||||
this.dialogFormEdit = true
|
||||
this.form = {
|
||||
TITLE: v.TITLE,
|
||||
CONTENT: v.CONTENT,
|
||||
LEVEL: v.LEVEL,
|
||||
ID: v.ID
|
||||
}
|
||||
this.dialogType = 'editUser'
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
handleAdd() {
|
||||
this.dialogFormEdit = true
|
||||
this.form = {}
|
||||
this.dialogType = 'saveUser'
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
confirm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.FFILE.length > 0) {
|
||||
this.upload((v) => {
|
||||
this.form.FILE_URL = v
|
||||
this.$refs.upload.clearFiles()
|
||||
this.dataSave()
|
||||
})
|
||||
} else {
|
||||
this.dataSave()
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
dataSave() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/save', this.form
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
//* *****************************删除********************************
|
||||
handleDelete(id, name) {
|
||||
this.$confirm('确定要删除[' + name + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/delete',
|
||||
{
|
||||
id: id
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result == 'success') {
|
||||
this.listLoading = false
|
||||
this.getList()
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
makeAll() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
console.info('_selectData')
|
||||
console.info(_selectData)
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要删除的项...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.ID
|
||||
}).join(',')
|
||||
|
||||
this.$confirm('确定要删除选中的数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/deleteAll',
|
||||
{
|
||||
ids: ids
|
||||
}
|
||||
).then(() => {
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,324 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container" style=" display: flex;justify-content: space-between;">
|
||||
<div>
|
||||
<el-tag>案例总结</el-tag>
|
||||
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<el-button type="primary" @click="goBack">返回基本信息</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="varList" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="CONTENT" label="内容" show-overflow-tooltip="true" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" width="180" align="center" label="附件" >
|
||||
<template v-if="row.FILE_URL" slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-down" size="mini" @click="download(row)">下载</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-document" size="mini" @click="handleDetail(row)">查看</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.ID,row.NAME)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<template>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">添加</el-button>
|
||||
<!-- <el-button type="danger" icon="el-icon-delete" plain @click="makeAll('0')">删除</el-button>-->
|
||||
</template>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改案例总结':'新增案例总结'" width="600px">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
|
||||
|
||||
<el-form-item label="内容" prop="CONTENT">
|
||||
<el-input
|
||||
v-model="form.CONTENT"
|
||||
:rows="10"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:on-change="handleEditChange"
|
||||
:on-remove="handleRemove"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
action="#" >
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormEdit = false">取 消</el-button>
|
||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormShow" title="查看" width="800px">
|
||||
<table class="table-ui">
|
||||
<tr>
|
||||
<td class="tbg">内容</td>
|
||||
<td>
|
||||
<div v-html="form.CONTENT" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="form.FILE_URL">
|
||||
<td class="tbg">附件</td>
|
||||
<td><a @click="download(form)">下载</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormShow = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import { upload } from '@/utils/upload'
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
total: 0,
|
||||
varList: [],
|
||||
KEYWORDS: '',
|
||||
dialogFormEdit: false,
|
||||
dialogFormShow: false,
|
||||
dialogType: 'add',
|
||||
form: {
|
||||
NAME: '',
|
||||
TYPE: '',
|
||||
CONTENT: ''
|
||||
},
|
||||
rules: {
|
||||
TYPE: [
|
||||
{ required: true, message: '名称不能为空', trigger: 'blur' },
|
||||
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }
|
||||
],
|
||||
NAME: [
|
||||
{ required: true, message: '类型不能为空', trigger: 'blur' },
|
||||
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }]
|
||||
|
||||
},
|
||||
FFILE: [],
|
||||
caselibraryid: ''
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
if (this.$parent.CASE_ID) {
|
||||
this.caselibraryid = this.$parent.CASE_ID
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
this.$parent.activeName = 'casebasic'
|
||||
},
|
||||
//* ************************下载**********************
|
||||
download(obj) {
|
||||
this.$confirm('确定要下载此文件吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.downloadUrl = config.fileUrl + obj.FILE_URL
|
||||
const _this = this
|
||||
setTimeout(function() {
|
||||
window.open(_this.downloadUrl)
|
||||
}, 200)
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// **********************文件上传*********************
|
||||
handleEditChange(file) {
|
||||
file.MATERIALS_ID = Math.random()
|
||||
const is5M = file.size / 1024 / 1024 < 5
|
||||
if (is5M) this.FFILE.push(file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.FFILE = fileList
|
||||
},
|
||||
upload(fun) {
|
||||
const formData = new FormData()
|
||||
|
||||
for (let i = 0; i < this.FFILE.length; i++) {
|
||||
if (this.FFILE[i].raw) {
|
||||
formData.append('FFILE', this.FFILE[i].raw)
|
||||
}
|
||||
}
|
||||
upload(
|
||||
'/file/upload',
|
||||
formData
|
||||
).then((data) => {
|
||||
fun(data.fileurl)
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
//* *******************列表查询******************************
|
||||
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/summarylist?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
id: this.caselibraryid
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
//* ****************************数据查看*******************************
|
||||
handleDetail(v) {
|
||||
this.dialogFormShow = true
|
||||
this.form = {
|
||||
CONTENT: v.CONTENT,
|
||||
FILE_URL: v.FILE_URL,
|
||||
YJ_CASE_LIBRARY_ID: v.YJ_CASE_LIBRARY_ID
|
||||
}
|
||||
},
|
||||
//* ***************************数据保存**********************************
|
||||
handleEdit(v) {
|
||||
this.dialogFormEdit = true
|
||||
this.form = {
|
||||
CONTENT: v.CONTENT,
|
||||
ID: v.ID,
|
||||
YJ_CASE_LIBRARY_ID: v.YJ_CASE_LIBRARY_ID
|
||||
}
|
||||
this.dialogType = 'editUser'
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
handleAdd() {
|
||||
this.dialogFormEdit = true
|
||||
this.form = {}
|
||||
this.dialogType = 'saveUser'
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
confirm() {
|
||||
this.form.YJ_CASE_LIBRARY_ID = this.caselibraryid
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.FFILE.length > 0) {
|
||||
this.upload((v) => {
|
||||
this.form.FILE_URL = v
|
||||
this.$refs.upload.clearFiles()
|
||||
this.dataSave()
|
||||
})
|
||||
} else {
|
||||
this.dataSave()
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
dataSave() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/summarysave', this.form
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.dialogFormEdit = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
//* *****************************删除********************************
|
||||
handleDelete(id, name) {
|
||||
this.$confirm('确定要删除[' + name + ']吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/summarydelete',
|
||||
{
|
||||
id: id
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result == 'success') {
|
||||
this.listLoading = false
|
||||
this.getList()
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
makeAll() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
console.info('_selectData')
|
||||
console.info(_selectData)
|
||||
if (_selectData == null || _selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选中要删除的项...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
const ids = _selectData.map((item, index) => {
|
||||
return item.ID
|
||||
}).join(',')
|
||||
|
||||
this.$confirm('确定要删除选中的数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/caseLibrary/deleteAll',
|
||||
{
|
||||
ids: ids
|
||||
}
|
||||
).then(() => {
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<casebasic v-show="activeName=='casebasic'" ref="list" />
|
||||
<casesummary v-if="activeName=='casesummary'"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import casebasic from './components/casebasic'
|
||||
import casesummary from './components/casesummary'
|
||||
export default {
|
||||
components: { casebasic, casesummary },
|
||||
data() {
|
||||
return {
|
||||
activeName: 'casebasic',
|
||||
CASE_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue