|
@@ -29,12 +29,12 @@
|
|
|
:value="dict.value"/>
|
|
:value="dict.value"/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="演练角色" prop="planRoleId">
|
|
|
|
|
- <el-select v-model="queryParams.planRoleId" placeholder="请选择演练角色" clearable>
|
|
|
|
|
- <el-option v-for="item in planRoleList" :key="item.roleId" :label="item.roleName"
|
|
|
|
|
- :value="item.roleId"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+ <!-- <el-form-item label="演练角色" prop="planRoleId">
|
|
|
|
|
+ <el-select v-model="queryParams.planRoleId" placeholder="请选择演练角色" clearable>
|
|
|
|
|
+ <el-option v-for="item in planRoleList" :key="item.roleId" :label="item.roleName"
|
|
|
|
|
+ :value="item.roleId"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item label="计划名称" prop="planName">
|
|
<el-form-item label="计划名称" prop="planName">
|
|
|
<el-input v-model="queryParams.planName" placeholder="请输入计划名称" clearable
|
|
<el-input v-model="queryParams.planName" placeholder="请输入计划名称" clearable
|
|
|
@keyup.enter.native="handleQuery"/>
|
|
@keyup.enter.native="handleQuery"/>
|
|
@@ -67,20 +67,20 @@
|
|
|
<dict-tag :options="dict.type.sys_org_type" :value="scope.row.execOrgType"/>
|
|
<dict-tag :options="dict.type.sys_org_type" :value="scope.row.execOrgType"/>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="planRoleNameList" label="演练角色" width="200">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <template v-if="scope.row.planRoleNameList">
|
|
|
|
|
- <el-tag size="mini" type="success" style="margin-right: 5px;"
|
|
|
|
|
- v-for="(item, index) in (scope.row.planRoleNameList || '').split(',')"
|
|
|
|
|
- :key="index">
|
|
|
|
|
- {{ item }}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
- <el-tag size="mini">{{ scope.row.checkOrgTypeText }}</el-tag>
|
|
|
|
|
- </template>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
|
+ <!-- <el-table-column prop="planRoleNameList" label="演练角色" width="200">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <template v-if="scope.row.planRoleNameList">
|
|
|
|
|
+ <el-tag size="mini" type="success" style="margin-right: 5px;"
|
|
|
|
|
+ v-for="(item, index) in (scope.row.planRoleNameList || '').split(',')"
|
|
|
|
|
+ :key="index">
|
|
|
|
|
+ {{ item }}
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <el-tag size="mini">{{ scope.row.checkOrgTypeText }}</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>-->
|
|
|
<el-table-column label="计划周期" align="center" prop="planCycle">
|
|
<el-table-column label="计划周期" align="center" prop="planCycle">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.drill_plan_cycle" :value="scope.row.planCycle"/>
|
|
<dict-tag :options="dict.type.drill_plan_cycle" :value="scope.row.planCycle"/>
|
|
@@ -103,7 +103,7 @@
|
|
|
@click="handleRevocation(scope.row)" v-hasPermi="['core:plan:edit']">撤回
|
|
@click="handleRevocation(scope.row)" v-hasPermi="['core:plan:edit']">撤回
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button v-if="checkCanEdit(scope.row)" size="mini" type="text" icon="el-icon-edit-outline"
|
|
<el-button v-if="checkCanEdit(scope.row)" size="mini" type="text" icon="el-icon-edit-outline"
|
|
|
- @click="handleUpdate(scope.row)" v-hasPermi="['core:drillPlan:edit']">修改
|
|
|
|
|
|
|
+ @click="handleUpdate(scope.row)" v-hasPermi="['core:drillPlan:edit']">编辑
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button v-if="checkCanDel(scope.row)" size="mini" type="text" icon="el-icon-delete"
|
|
<el-button v-if="checkCanDel(scope.row)" size="mini" type="text" icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)" v-hasPermi="['core:drillPlan:remove']">删除
|
|
@click="handleDelete(scope.row)" v-hasPermi="['core:drillPlan:remove']">删除
|
|
@@ -118,7 +118,8 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<!-- 添加或修改教育培训计划对话框 -->
|
|
<!-- 添加或修改教育培训计划对话框 -->
|
|
|
- <DialogCom :title="title" :visible.sync="open" :before-close="closeDialog" :close="cancel" width="850px" height="800px" append-to-body>
|
|
|
|
|
|
|
+ <DialogCom :title="title" :visible.sync="open" :before-close="closeDialog" :close="cancel" width="850px"
|
|
|
|
|
+ height="800px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -139,13 +140,13 @@
|
|
|
|
|
|
|
|
<el-col :span="12" v-show="form.planCycle != 0">
|
|
<el-col :span="12" v-show="form.planCycle != 0">
|
|
|
<el-form-item label="立即生效" prop="buildTaskNow">
|
|
<el-form-item label="立即生效" prop="buildTaskNow">
|
|
|
-<!-- <el-checkbox v-model="form.buildTaskNow">
|
|
|
|
|
- 默认从下个周期...
|
|
|
|
|
- <el-popover placement="top-start" title="" width="200" trigger="hover"
|
|
|
|
|
- content="默认从下个周期生成任务,勾选后从当前周期立即生成任务">
|
|
|
|
|
- <i class="el-icon-warning-outline change-icon" slot="reference"></i>
|
|
|
|
|
- </el-popover>
|
|
|
|
|
- </el-checkbox>-->
|
|
|
|
|
|
|
+ <!-- <el-checkbox v-model="form.buildTaskNow">
|
|
|
|
|
+ 默认从下个周期...
|
|
|
|
|
+ <el-popover placement="top-start" title="" width="200" trigger="hover"
|
|
|
|
|
+ content="默认从下个周期生成任务,勾选后从当前周期立即生成任务">
|
|
|
|
|
+ <i class="el-icon-warning-outline change-icon" slot="reference"></i>
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ </el-checkbox>-->
|
|
|
<el-checkbox v-model="form.buildTaskNow">
|
|
<el-checkbox v-model="form.buildTaskNow">
|
|
|
默认从下个周期生成任务,
|
|
默认从下个周期生成任务,
|
|
|
<br/>
|
|
<br/>
|
|
@@ -193,24 +194,24 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="演练角色" prop="planRoleId">
|
|
|
|
|
- <el-select v-model="form.planRoleId" placeholder="请选择" multiple style="width:100%">
|
|
|
|
|
- <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
+ <!-- <el-row>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="演练角色" prop="planRoleId">
|
|
|
|
|
+ <el-select v-model="form.planRoleId" placeholder="请选择" multiple style="width:100%">
|
|
|
|
|
+ <el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
|
|
|
-<!-- <el-col :span="12">
|
|
|
|
|
- <el-form-item v-if="this.form.id" label="计划状态" prop="planStatus">
|
|
|
|
|
- <el-select v-model="form.planStatus" placeholder="请选择计划状态" style="width: 100%;">
|
|
|
|
|
- <el-option v-for="dict in dict.type.drill_plan_status" :key="dict.value" :label="dict.label"
|
|
|
|
|
- :value="parseInt(dict.value)"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>-->
|
|
|
|
|
- </el-row>
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item v-if="this.form.id" label="计划状态" prop="planStatus">
|
|
|
|
|
+ <el-select v-model="form.planStatus" placeholder="请选择计划状态" style="width: 100%;">
|
|
|
|
|
+ <el-option v-for="dict in dict.type.drill_plan_status" :key="dict.value" :label="dict.label"
|
|
|
|
|
+ :value="parseInt(dict.value)"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>-->
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item v-show="form.execOrgType" label="演练机构" prop="planExecOrgIdList">
|
|
<el-form-item v-show="form.execOrgType" label="演练机构" prop="planExecOrgIdList">
|
|
@@ -241,7 +242,7 @@
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- </DialogCom>
|
|
|
|
|
|
|
+ </DialogCom>
|
|
|
<DialogSelectFile
|
|
<DialogSelectFile
|
|
|
ref="DialogSelectFile"
|
|
ref="DialogSelectFile"
|
|
|
:defaultSelect=defaultSelect
|
|
:defaultSelect=defaultSelect
|
|
@@ -270,6 +271,7 @@ import {deptTreeSelect} from "@/api/system/public";
|
|
|
import KFileUpload from "@/components/K-FileUpload/index.vue";
|
|
import KFileUpload from "@/components/K-FileUpload/index.vue";
|
|
|
import DialogSelectFile from "./dialog.select.file.vue";
|
|
import DialogSelectFile from "./dialog.select.file.vue";
|
|
|
import OrgTreeSelect from '@/components/orgTreeSelect'
|
|
import OrgTreeSelect from '@/components/orgTreeSelect'
|
|
|
|
|
+import dayjs from "dayjs";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "Plan",
|
|
name: "Plan",
|
|
@@ -354,7 +356,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
- this.initPlanRoleList();
|
|
|
|
|
|
|
+ //this.initPlanRoleList();
|
|
|
this.orgId = this.$store.getters.orgId;
|
|
this.orgId = this.$store.getters.orgId;
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -410,15 +412,16 @@ export default {
|
|
|
//所属机构为当前用户登录机构时才显示 “编辑、删除”按钮
|
|
//所属机构为当前用户登录机构时才显示 “编辑、删除”按钮
|
|
|
checkCanEdit(row) {
|
|
checkCanEdit(row) {
|
|
|
// console.log("checkCanEdit",this.$store.getters.orgId,row.belongOrgId)
|
|
// console.log("checkCanEdit",this.$store.getters.orgId,row.belongOrgId)
|
|
|
- return (row.belongOrgId == this.$store.getters.orgId || row.createOrgId == this.$store.getters.orgId)
|
|
|
|
|
|
|
+ // return (row.belongOrgId == this.$store.getters.orgId || row.createOrgId == this.$store.getters.orgId)
|
|
|
|
|
+ return (row.belongOrgId == this.$store.getters.orgId)
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
checkCanDel(row) {
|
|
checkCanDel(row) {
|
|
|
// console.log("checkCanEdit",this.$store.getters.orgId,row)
|
|
// console.log("checkCanEdit",this.$store.getters.orgId,row)
|
|
|
// 计划仅能够通过删除标准计划来删除
|
|
// 计划仅能够通过删除标准计划来删除
|
|
|
- /* return (row.belongOrgId == this.$store.getters.orgId || row.createOrgId == this.$store.getters.orgId)
|
|
|
|
|
- && (row.issue != 1 || (row.issue == 1 && row.done != 1))*/
|
|
|
|
|
- return row.standard == 1 && row.done != 1
|
|
|
|
|
|
|
+ /* return (row.belongOrgId == this.$store.getters.orgId || row.createOrgId == this.$store.getters.orgId)
|
|
|
|
|
+ && (row.issue != 1 || (row.issue == 1 && row.done != 1))*/
|
|
|
|
|
+ return row.standard == 1 && row.done != 1 && this.checkCanEdit(row);
|
|
|
},
|
|
},
|
|
|
//省联社下发的计划不显示“删除”按钮
|
|
//省联社下发的计划不显示“删除”按钮
|
|
|
checkCreateByTopOrg(row) {
|
|
checkCreateByTopOrg(row) {
|
|
@@ -426,7 +429,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
execOrgTypeChanged(row) {
|
|
execOrgTypeChanged(row) {
|
|
|
this.$refs['orgTreeSelect'].clear();
|
|
this.$refs['orgTreeSelect'].clear();
|
|
|
- this.initRoleList(this.form.execOrgType);
|
|
|
|
|
|
|
+ // this.initRoleList(this.form.execOrgType);
|
|
|
// this.form.planExecOrgIdList = [];
|
|
// this.form.planExecOrgIdList = [];
|
|
|
},
|
|
},
|
|
|
/** 查询机构树数据 */
|
|
/** 查询机构树数据 */
|
|
@@ -442,8 +445,8 @@ export default {
|
|
|
this.$refs['orgTreeSelect'].clear();
|
|
this.$refs['orgTreeSelect'].clear();
|
|
|
this.$refs["upload"].clearFiles();
|
|
this.$refs["upload"].clearFiles();
|
|
|
},
|
|
},
|
|
|
- closeDialog(){
|
|
|
|
|
- this.cancel();
|
|
|
|
|
|
|
+ closeDialog() {
|
|
|
|
|
+ this.cancel();
|
|
|
},
|
|
},
|
|
|
// 表单重置
|
|
// 表单重置
|
|
|
reset() {
|
|
reset() {
|
|
@@ -478,7 +481,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 节点单击事件
|
|
// 节点单击事件
|
|
|
clickTreeNode(data) {
|
|
clickTreeNode(data) {
|
|
|
- this.initPlanRoleList();
|
|
|
|
|
|
|
+ //this.initPlanRoleList();
|
|
|
this.queryParams.belongOrgId = data.id;
|
|
this.queryParams.belongOrgId = data.id;
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
},
|
|
},
|
|
@@ -512,15 +515,15 @@ export default {
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
handleAdd() {
|
|
|
- this.initRoleList();
|
|
|
|
|
|
|
+ //this.initRoleList();
|
|
|
this.getDeptTree()
|
|
this.getDeptTree()
|
|
|
this.reset();
|
|
this.reset();
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
- this.title = "添加预案演练计划";
|
|
|
|
|
|
|
+ this.title = "新增演练计划";
|
|
|
},
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
|
- this.initRoleList();
|
|
|
|
|
|
|
+ // this.initRoleList();
|
|
|
this.getDeptTree()
|
|
this.getDeptTree()
|
|
|
this.reset();
|
|
this.reset();
|
|
|
const id = row.id || this.ids
|
|
const id = row.id || this.ids
|
|
@@ -528,11 +531,15 @@ export default {
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
this.formFileListDefualtValue = this.form.fileList;
|
|
this.formFileListDefualtValue = this.form.fileList;
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
- this.title = "修改预案演练计划";
|
|
|
|
|
|
|
+ this.title = "编辑演练计划";
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
|
|
+ if (dayjs(this.form.startDate).isAfter(dayjs(this.form.endDate))) {
|
|
|
|
|
+ this.$message.error("开始时间不能大于结束时间!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
let request = {...this.form};
|
|
let request = {...this.form};
|
|
@@ -544,10 +551,10 @@ export default {
|
|
|
request.planExecOrgIdList = [];
|
|
request.planExecOrgIdList = [];
|
|
|
}
|
|
}
|
|
|
if (request.id != null) {
|
|
if (request.id != null) {
|
|
|
- this.$modal.confirm(this.getMsgStr(request,'修改')).then(function () {
|
|
|
|
|
|
|
+ this.$modal.confirm(this.getMsgStr(request, '编辑')).then(function () {
|
|
|
return updatePlan(request);
|
|
return updatePlan(request);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
|
|
|
|
+ this.$modal.msgSuccess("编辑成功");
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.getList();
|
|
this.getList();
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|