|  | @@ -19,7 +19,7 @@
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  |                <el-form-item prop="planName" label="任务名称:">
 | 
	
		
			
				|  |  |                  <el-input
 | 
	
		
			
				|  |  | -                :disabled="isChildren()"
 | 
	
		
			
				|  |  | +                  :disabled="isChildren()"
 | 
	
		
			
				|  |  |                    v-model.trim="formData.planName"
 | 
	
		
			
				|  |  |                    :maxlength="50"
 | 
	
		
			
				|  |  |                    name="planName"
 | 
	
	
		
			
				|  | @@ -31,6 +31,7 @@
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  |                <el-form-item prop="checkType" label="任务类型:">
 | 
	
		
			
				|  |  |                  <el-select
 | 
	
		
			
				|  |  | +                  @change="changeData"
 | 
	
		
			
				|  |  |                    :disabled="isChildren()"
 | 
	
		
			
				|  |  |                    label="任务类型"
 | 
	
		
			
				|  |  |                    v-model="formData.checkType"
 | 
	
	
		
			
				|  | @@ -259,14 +260,16 @@
 | 
	
		
			
				|  |  |          </el-form>
 | 
	
		
			
				|  |  |          <el-button @click="openSelect">选择检查内容</el-button>
 | 
	
		
			
				|  |  |          <el-button @click="deleteSelected">批量删除</el-button>
 | 
	
		
			
				|  |  | -        <el-table 
 | 
	
		
			
				|  |  | +        <el-table
 | 
	
		
			
				|  |  |            :data="tableData"
 | 
	
		
			
				|  |  | -          style="width: 100%;margin-top: 15px;"
 | 
	
		
			
				|  |  | +          style="width: 100%; margin-top: 15px"
 | 
	
		
			
				|  |  |            height="400px"
 | 
	
		
			
				|  |  |            @selection-change="handleSelectionChange"
 | 
	
		
			
				|  |  | -          
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  | -          <el-table-column type="selection" :selectable="handleSelectable"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column
 | 
	
		
			
				|  |  | +            type="selection"
 | 
	
		
			
				|  |  | +            :selectable="handleSelectable"
 | 
	
		
			
				|  |  | +          ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column label="是否扫描">
 | 
	
		
			
				|  |  |              <template v-slot="{ row }">
 | 
	
		
			
				|  |  |                <el-switch
 | 
	
	
		
			
				|  | @@ -328,7 +331,6 @@
 | 
	
		
			
				|  |  |        <div slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  |          <el-button type="primary" @click="onSubmit">确定</el-button>
 | 
	
		
			
				|  |  |          <el-button @click="onHide">取消</el-button>
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </DialogCom>
 | 
	
		
			
				|  |  |      <DialogSelect
 | 
	
	
		
			
				|  | @@ -373,7 +375,7 @@ export default {
 | 
	
		
			
				|  |  |        execOrgType: null,
 | 
	
		
			
				|  |  |        roleNames: null,
 | 
	
		
			
				|  |  |        planExec: null,
 | 
	
		
			
				|  |  | -      defbuildTaskNow:false,
 | 
	
		
			
				|  |  | +      defbuildTaskNow: false,
 | 
	
		
			
				|  |  |        count: 0,
 | 
	
		
			
				|  |  |        description: null,
 | 
	
		
			
				|  |  |        selectedRows: [],
 | 
	
	
		
			
				|  | @@ -411,17 +413,120 @@ export default {
 | 
	
		
			
				|  |  |      ...mapGetters(["orgId", "orgName"]),
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    isbuildTaskNow(){
 | 
	
		
			
				|  |  | +    //选择计划类型修改联动框
 | 
	
		
			
				|  |  | +    changeData() {
 | 
	
		
			
				|  |  | +      //判断计划类型
 | 
	
		
			
				|  |  | +      switch (this.formData.checkType) {
 | 
	
		
			
				|  |  | +        //如果是  【定期检查】全省农信系统安全检查
 | 
	
		
			
				|  |  | +        case "1":
 | 
	
		
			
				|  |  | +          //周期
 | 
	
		
			
				|  |  | +          this.formData.planCycle = "5";
 | 
	
		
			
				|  |  | +          //机构类型
 | 
	
		
			
				|  |  | +          this.formData.execOrgType = "1";
 | 
	
		
			
				|  |  | +          this.getRolesByOrg();
 | 
	
		
			
				|  |  | +          //角色
 | 
	
		
			
				|  |  | +          this.formData.roleIds = ["116"];
 | 
	
		
			
				|  |  | +          //检查次数
 | 
	
		
			
				|  |  | +          this.formData.count = 1;
 | 
	
		
			
				|  |  | +          //检查内容
 | 
	
		
			
				|  |  | +          this.tableData = null;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +        //如果是  【定期检查】办事处辖区安全检查
 | 
	
		
			
				|  |  | +        case "2":
 | 
	
		
			
				|  |  | +          //周期
 | 
	
		
			
				|  |  | +          this.formData.planCycle = "5";
 | 
	
		
			
				|  |  | +          //机构类型
 | 
	
		
			
				|  |  | +          this.formData.execOrgType = "2";
 | 
	
		
			
				|  |  | +          this.getRolesByOrg();
 | 
	
		
			
				|  |  | +          //角色
 | 
	
		
			
				|  |  | +          this.formData.roleIds = ["118"];
 | 
	
		
			
				|  |  | +          //检查次数
 | 
	
		
			
				|  |  | +          this.formData.count = 2;
 | 
	
		
			
				|  |  | +          //检查内容
 | 
	
		
			
				|  |  | +          this.tableData = null;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +        //如果是  【定期检查】营业网点安全保卫检查
 | 
	
		
			
				|  |  | +        case "3":
 | 
	
		
			
				|  |  | +          //周期
 | 
	
		
			
				|  |  | +          this.formData.planCycle = "2";
 | 
	
		
			
				|  |  | +          //机构类型
 | 
	
		
			
				|  |  | +          this.formData.execOrgType = "4";
 | 
	
		
			
				|  |  | +          this.getRolesByOrg();
 | 
	
		
			
				|  |  | +          //角色
 | 
	
		
			
				|  |  | +          this.formData.roleIds = ["121"];
 | 
	
		
			
				|  |  | +          //检查次数
 | 
	
		
			
				|  |  | +          this.formData.count = 3;
 | 
	
		
			
				|  |  | +          //检查内容
 | 
	
		
			
				|  |  | +          this.tableData = null;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +        //如果是  【定期检查】行社全面安全检查
 | 
	
		
			
				|  |  | +        case "4":
 | 
	
		
			
				|  |  | +          //周期
 | 
	
		
			
				|  |  | +          this.formData.planCycle = "5";
 | 
	
		
			
				|  |  | +          //机构类型
 | 
	
		
			
				|  |  | +          this.formData.execOrgType = "3";
 | 
	
		
			
				|  |  | +          this.getRolesByOrg();
 | 
	
		
			
				|  |  | +          //角色
 | 
	
		
			
				|  |  | +          this.formData.roleIds = ["120"];
 | 
	
		
			
				|  |  | +          //检查次数
 | 
	
		
			
				|  |  | +          this.formData.count = 2;
 | 
	
		
			
				|  |  | +          //检查内容
 | 
	
		
			
				|  |  | +          this.tableData = null;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +        //如果是  【不定期检查】阶段性检查
 | 
	
		
			
				|  |  | +        case "5":
 | 
	
		
			
				|  |  | +          //周期
 | 
	
		
			
				|  |  | +          this.formData.planCycle = "6";
 | 
	
		
			
				|  |  | +          //机构类型
 | 
	
		
			
				|  |  | +          this.formData.execOrgType = null;
 | 
	
		
			
				|  |  | +          //角色
 | 
	
		
			
				|  |  | +          this.formData.roleIds = [];
 | 
	
		
			
				|  |  | +          //检查次数
 | 
	
		
			
				|  |  | +          this.formData.count = 1;
 | 
	
		
			
				|  |  | +          //检查内容
 | 
	
		
			
				|  |  | +          this.tableData = null;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +        //如果是  【不定期检查】专项检查
 | 
	
		
			
				|  |  | +        case "6":
 | 
	
		
			
				|  |  | +          //周期
 | 
	
		
			
				|  |  | +          this.formData.planCycle = "6";
 | 
	
		
			
				|  |  | +          //机构类型
 | 
	
		
			
				|  |  | +          this.formData.execOrgType = null;
 | 
	
		
			
				|  |  | +          //角色
 | 
	
		
			
				|  |  | +          this.formData.roleList = [];
 | 
	
		
			
				|  |  | +          //检查次数
 | 
	
		
			
				|  |  | +          this.formData.count = 1;
 | 
	
		
			
				|  |  | +          //检查内容
 | 
	
		
			
				|  |  | +          this.tableData = null;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +        //如果是  其他
 | 
	
		
			
				|  |  | +        case "7":
 | 
	
		
			
				|  |  | +          //周期
 | 
	
		
			
				|  |  | +          this.formData.planCycle = null;
 | 
	
		
			
				|  |  | +          //机构类型
 | 
	
		
			
				|  |  | +          this.formData.execOrgType = null;
 | 
	
		
			
				|  |  | +          //角色
 | 
	
		
			
				|  |  | +          this.formData.roleList = [];
 | 
	
		
			
				|  |  | +          //检查次数
 | 
	
		
			
				|  |  | +          this.formData.count = 1;
 | 
	
		
			
				|  |  | +          //检查内容
 | 
	
		
			
				|  |  | +          this.tableData = null;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.changeBuildTime();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    isbuildTaskNow() {
 | 
	
		
			
				|  |  |        if (
 | 
	
		
			
				|  |  |          (this.formData.planCreateOrgId == this.orgId &&
 | 
	
		
			
				|  |  |            this.formData.hasEdit != 1) ||
 | 
	
		
			
				|  |  |          (this.formData.planOfOrgType != 3 && this.formData.hasEdit != 1) ||
 | 
	
		
			
				|  |  | -        this.id == null
 | 
	
		
			
				|  |  | -      &&(this.id==null||this.id==undefined||this.formData.planStatus==0)) {
 | 
	
		
			
				|  |  | +        (this.id == null &&
 | 
	
		
			
				|  |  | +          (this.id == null ||
 | 
	
		
			
				|  |  | +            this.id == undefined ||
 | 
	
		
			
				|  |  | +            this.formData.planStatus == 0))
 | 
	
		
			
				|  |  | +      ) {
 | 
	
		
			
				|  |  |          return false;
 | 
	
		
			
				|  |  |        } else return true;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      handleSelectable(row) {
 | 
	
		
			
				|  |  |        // 在这里根据特定条件判断是否禁用多选框行
 | 
	
	
		
			
				|  | @@ -465,7 +570,13 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      NowBuild() {
 | 
	
		
			
				|  |  |        //如果新增或者是草稿状态的立即生效的编辑
 | 
	
		
			
				|  |  | -      if ((this.formData.planCycle!=6)&&((this.id==null||this.id==undefined)||(this.defbuildTaskNow &&this.formData.planStatus==0))) return true;
 | 
	
		
			
				|  |  | +      if (
 | 
	
		
			
				|  |  | +        this.formData.planCycle != 6 &&
 | 
	
		
			
				|  |  | +        (this.id == null ||
 | 
	
		
			
				|  |  | +          this.id == undefined ||
 | 
	
		
			
				|  |  | +          (this.defbuildTaskNow && this.formData.planStatus == 0))
 | 
	
		
			
				|  |  | +      )
 | 
	
		
			
				|  |  | +        return true;
 | 
	
		
			
				|  |  |        else return false;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getLabel(options, value) {
 | 
	
	
		
			
				|  | @@ -543,7 +654,7 @@ export default {
 | 
	
		
			
				|  |  |      async refresh(id, other) {
 | 
	
		
			
				|  |  |        if (id != null && id != undefined) {
 | 
	
		
			
				|  |  |          await api.get(id).then((res) => {
 | 
	
		
			
				|  |  | -          this.defbuildTaskNow=res.data.buildTaskNow;
 | 
	
		
			
				|  |  | +          this.defbuildTaskNow = res.data.buildTaskNow;
 | 
	
		
			
				|  |  |            this.parentCount = res.data.parentCount;
 | 
	
		
			
				|  |  |            this.formData = res.data;
 | 
	
		
			
				|  |  |            this.formData.buildTaskNow;
 | 
	
	
		
			
				|  | @@ -595,7 +706,7 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onSelect(selectList) {
 | 
	
		
			
				|  |  | -      console.log(selectList,"selectList");
 | 
	
		
			
				|  |  | +      console.log(selectList, "selectList");
 | 
	
		
			
				|  |  |        for (let i = 0; i < selectList.length; i++) {
 | 
	
		
			
				|  |  |          let tem = {
 | 
	
		
			
				|  |  |            ofOrgId: this.orgId,
 | 
	
	
		
			
				|  | @@ -612,9 +723,9 @@ export default {
 | 
	
		
			
				|  |  |          if (this.tableData == null) {
 | 
	
		
			
				|  |  |            this.tableData = [];
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if(tem.itemName!=null&&tem.itemName!=undefined){
 | 
	
		
			
				|  |  | -        this.tableData.push(tem);
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +        if (tem.itemName != null && tem.itemName != undefined) {
 | 
	
		
			
				|  |  | +          this.tableData.push(tem);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -671,16 +782,15 @@ export default {
 | 
	
		
			
				|  |  |          this.formData.roleList = null;
 | 
	
		
			
				|  |  |          this.formData.roleIds =
 | 
	
		
			
				|  |  |            this.selectedValues.length == 0 ? null : this.selectedValues;
 | 
	
		
			
				|  |  | -          this.loading = true;
 | 
	
		
			
				|  |  | -          if(this.formData.planCycle==6){
 | 
	
		
			
				|  |  | -            this.formData.buildTaskNow = true;
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        await api.add(this.formData).then(data=>{
 | 
	
		
			
				|  |  | +        this.loading = true;
 | 
	
		
			
				|  |  | +        if (this.formData.planCycle == 6) {
 | 
	
		
			
				|  |  | +          this.formData.buildTaskNow = true;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        await api.add(this.formData).then((data) => {
 | 
	
		
			
				|  |  |            this.loading = false;
 | 
	
		
			
				|  |  |            this.$emit("success");
 | 
	
		
			
				|  |  | -        this.onHide();
 | 
	
		
			
				|  |  | +          this.onHide();
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      handleRolesChange(val) {
 |