|
|
@@ -56,6 +56,8 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="drillDictionaryList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column label="编号" align="center" prop="id"/>
|
|
|
+ <el-table-column label="机构名称" align="center" prop="orgName" />
|
|
|
+
|
|
|
<el-table-column label="演练类型" align="center" prop="drillType">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.core_drill_type" :value="scope.row.drillType"/>
|
|
|
@@ -77,18 +79,20 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
+ v-if="canEdit(scope.row)"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['core:drillDictionary:edit']"
|
|
|
>修改
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
+ <BtnTip
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
+ v-if="canDelete(scope.row)"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['core:drillDictionary:remove']"
|
|
|
>删除
|
|
|
- </el-button>
|
|
|
+ </BtnTip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -103,10 +107,10 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- 添加或修改预案演练库对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
+ <DialogCom :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="演练类型" prop="drillType">
|
|
|
- <el-select v-model="form.drillType" placeholder="请选择演练类型">
|
|
|
+ <el-form-item label="演练类型" prop="drillType" style="width:100%;">
|
|
|
+ <el-select v-model="form.drillType" placeholder="请选择演练类型" style="width:100%;">
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.core_drill_type"
|
|
|
:key="dict.value"
|
|
|
@@ -116,17 +120,18 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="解决方案" prop="drillProjects">
|
|
|
- <el-input v-model="form.drillProjects" type="textarea" placeholder="请输入内容"/>
|
|
|
+ <el-input v-model="form.drillProjects" maxlength="50" placeholder="请输入解决方案"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="预设案由" prop="defaultCause">
|
|
|
- <el-input v-model="form.defaultCause" type="textarea" placeholder="请输入内容"/>
|
|
|
+ <el-input v-model="form.defaultCause" maxlength="2000" :rows="6"
|
|
|
+ show-word-limit type="textarea" placeholder="请输入预设案由"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </DialogCom>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
@@ -140,13 +145,13 @@ import {
|
|
|
updateDrillDictionary
|
|
|
} from "@/api/core/drill/drillDictionary";
|
|
|
import OrgTree from "@/components/orgTree";
|
|
|
-import kOrgTree from "@/components/k-orgTree";
|
|
|
+import BtnTip from "@/components/btnTip";
|
|
|
import KFileUpload from "@/components/K-FileUpload";
|
|
|
import tableList from "@/mixins/tableList";
|
|
|
import {queryKnowledgeList} from "@/api/core/edu/knowledge";
|
|
|
export default {
|
|
|
name: "DrillDictionary",
|
|
|
- components: {OrgTree},
|
|
|
+ components: {OrgTree,BtnTip},
|
|
|
dicts: ['core_drill_type'],
|
|
|
mixins: [tableList],
|
|
|
data() {
|
|
|
@@ -177,15 +182,20 @@ export default {
|
|
|
drillTypeName: null,
|
|
|
drillProjects: null,
|
|
|
defaultCause: null,
|
|
|
+ checkSub:true
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
- rules: {}
|
|
|
+ rules: {
|
|
|
+ drillType: [{ required: true, message: "请选择演练类型" }],
|
|
|
+ drillProjects: [{ required: true, message: "请输入解决方案名称" }],
|
|
|
+ defaultCause: [{ required: true, message: "请输入预设案由" }],
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
+ // this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询预案演练库列表 */
|
|
|
@@ -210,6 +220,7 @@ export default {
|
|
|
drillType: null,
|
|
|
drillProjects: null,
|
|
|
defaultCause: null,
|
|
|
+ checkSub:true,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
@@ -253,7 +264,11 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
- this.title = "添加预案演练库";
|
|
|
+ this.title = "添加参考预案演练库";
|
|
|
+ },
|
|
|
+ canEdit(row)
|
|
|
+ {
|
|
|
+ return row.orgId == this.$store.getters.orgId;
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
@@ -262,7 +277,7 @@ export default {
|
|
|
getDrillDictionary(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
- this.title = "修改预案演练库";
|
|
|
+ this.title = "修改参考预案演练库";
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
@@ -285,16 +300,27 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ canDelete(row)
|
|
|
+ {
|
|
|
+ return row.orgId == this.$store.getters.orgId;
|
|
|
+ },
|
|
|
+
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除预案演练库编号为"' + ids + '"的数据项?').then(function () {
|
|
|
- return delDrillDictionary(ids);
|
|
|
- }).then(() => {
|
|
|
+ delDrillDictionary(ids).then(response => {
|
|
|
this.getList();
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {
|
|
|
+ }).catch(() => {
|
|
|
+ this.$modal.msgSuccess("删除失败");
|
|
|
});
|
|
|
+ // this.$modal.confirm('是否确认删除预案演练库编号为"' + ids + '"的数据项?').then(function () {
|
|
|
+ // return delDrillDictionary(ids);
|
|
|
+ // }).then(() => {
|
|
|
+ // this.getList();
|
|
|
+ // this.$modal.msgSuccess("删除成功");
|
|
|
+ // }).catch(() => {
|
|
|
+ // });
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|