|  | @@ -78,11 +78,12 @@
 | 
	
		
			
				|  |  |                  <el-date-picker
 | 
	
		
			
				|  |  |                    :disabled="cannotEdit()"
 | 
	
		
			
				|  |  |                    v-model="formData.startDate"
 | 
	
		
			
				|  |  | -                  style="width: 240px"
 | 
	
		
			
				|  |  | +                  style="width: 217px"
 | 
	
		
			
				|  |  |                    value-format="yyyy-MM-dd 00:00:00"
 | 
	
		
			
				|  |  |                    placeholder="请选择开始时间"
 | 
	
		
			
				|  |  |                    type="date"
 | 
	
		
			
				|  |  |                    :clearable="false"
 | 
	
		
			
				|  |  | +                  :picker-options="datepickerOptions"
 | 
	
		
			
				|  |  |                  ></el-date-picker>
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
	
		
			
				|  | @@ -96,11 +97,12 @@
 | 
	
		
			
				|  |  |                  <el-date-picker
 | 
	
		
			
				|  |  |                    :disabled="cannotEdit()"
 | 
	
		
			
				|  |  |                    v-model="formData.endDate"
 | 
	
		
			
				|  |  | -                  style="width: 240px"
 | 
	
		
			
				|  |  | +                  style="width: 217px"
 | 
	
		
			
				|  |  |                    value-format="yyyy-MM-dd 23:59:59"
 | 
	
		
			
				|  |  |                    placeholder="请选择结束时间"
 | 
	
		
			
				|  |  |                    type="date"
 | 
	
		
			
				|  |  |                    :clearable="false"
 | 
	
		
			
				|  |  | +                  :picker-options="datepickerOptions"
 | 
	
		
			
				|  |  |                  ></el-date-picker>
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
	
		
			
				|  | @@ -175,7 +177,6 @@
 | 
	
		
			
				|  |  |                <el-form-item prop="count" label="任务次数:">
 | 
	
		
			
				|  |  |                  <el-input-number
 | 
	
		
			
				|  |  |                    :disabled="cannotEdit()"
 | 
	
		
			
				|  |  | -                  style="margin-left: 10px"
 | 
	
		
			
				|  |  |                    v-model="formData.count"
 | 
	
		
			
				|  |  |                    controls-position="right"
 | 
	
		
			
				|  |  |                    @change="handleChange"
 | 
	
	
		
			
				|  | @@ -189,6 +190,7 @@
 | 
	
		
			
				|  |  |                  <org-tree-select
 | 
	
		
			
				|  |  |                    :disabled="cannotEdit()"
 | 
	
		
			
				|  |  |                    v-model="formData.execOrgIds"
 | 
	
		
			
				|  |  | +                  class="org-selector"
 | 
	
		
			
				|  |  |                    :queryData="parseInt(formData.execOrgType)"
 | 
	
		
			
				|  |  |                    ref="execorgTreeSelect"
 | 
	
		
			
				|  |  |                    :enabledCheckOrgTypes="parseInt(formData.execOrgType)"
 | 
	
	
		
			
				|  | @@ -202,9 +204,11 @@
 | 
	
		
			
				|  |  |                  <org-tree-select
 | 
	
		
			
				|  |  |                    :disabled="cannotEdit()"
 | 
	
		
			
				|  |  |                    v-model="formData.checkOrgIds"
 | 
	
		
			
				|  |  | +                  class="org-selector"
 | 
	
		
			
				|  |  |                    ref="checkorgTreeSelect"
 | 
	
		
			
				|  |  |                    :queryData="
 | 
	
		
			
				|  |  | -                    (formData.checkOrgTypes==null || formData.checkOrgTypes.length > 1)
 | 
	
		
			
				|  |  | +                    formData.checkOrgTypes == null ||
 | 
	
		
			
				|  |  | +                    formData.checkOrgTypes.length > 1
 | 
	
		
			
				|  |  |                        ? null
 | 
	
		
			
				|  |  |                        : parseInt(formData.checkOrgTypes[0])
 | 
	
		
			
				|  |  |                    "
 | 
	
	
		
			
				|  | @@ -263,13 +267,15 @@
 | 
	
		
			
				|  |  |            :data="tableData"
 | 
	
		
			
				|  |  |            style="width: 100%; margin-top: 15px"
 | 
	
		
			
				|  |  |            height="400px"
 | 
	
		
			
				|  |  | +          border
 | 
	
		
			
				|  |  |            @selection-change="handleSelectionChange"
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              type="selection"
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  |              :selectable="handleSelectable"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column label="是否扫描">
 | 
	
		
			
				|  |  | +          <el-table-column label="是否扫描" align="center">
 | 
	
		
			
				|  |  |              <template v-slot="{ row }">
 | 
	
		
			
				|  |  |                <el-switch
 | 
	
		
			
				|  |  |                  :disabled="!getshenglianshe(row)"
 | 
	
	
		
			
				|  | @@ -281,7 +287,7 @@
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -          <el-table-column label="必完成项">
 | 
	
		
			
				|  |  | +          <el-table-column label="必完成项" align="center">
 | 
	
		
			
				|  |  |              <template v-slot="{ row }">
 | 
	
		
			
				|  |  |                <el-switch
 | 
	
		
			
				|  |  |                  :disabled="!getshenglianshe(row)"
 | 
	
	
		
			
				|  | @@ -294,27 +300,26 @@
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column
 | 
	
		
			
				|  |  |              prop="ruleName"
 | 
	
		
			
				|  |  | -            label="检查手册
 | 
	
		
			
				|  |  | -          "
 | 
	
		
			
				|  |  | +            label="检查手册"
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  | +            show-overflow-tooltip
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="itemName" label="检查项"> </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="pointName" label="检查内容" width="300px">
 | 
	
		
			
				|  |  | +          <el-table-column prop="itemName" label="检查项" align="center">
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column
 | 
	
		
			
				|  |  | +            prop="pointName"
 | 
	
		
			
				|  |  | +            label="检查内容"
 | 
	
		
			
				|  |  | +            width="300px"
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  |              <template slot-scope="scope">
 | 
	
		
			
				|  |  |                <pre>{{ scope.row.pointName }}</pre>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column v-if="false" prop="ofOrgId" label="所属机构id">
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="areaName" label="检查区域"> </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="businessType" label="数据来源" v-if="false">
 | 
	
		
			
				|  |  | -            <template slot-scope="r">
 | 
	
		
			
				|  |  | -              {{
 | 
	
		
			
				|  |  | -                getLabel(dict.type.point_data_source, `${r.row.businessType}`)
 | 
	
		
			
				|  |  | -              }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +          <el-table-column prop="areaName" label="检查区域" align="center">
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="areaName" label="操作">
 | 
	
		
			
				|  |  | +          <el-table-column prop="areaName" label="操作" align="center">
 | 
	
		
			
				|  |  |              <template v-slot="{ row }">
 | 
	
		
			
				|  |  |                <el-button
 | 
	
		
			
				|  |  |                  v-if="
 | 
	
	
		
			
				|  | @@ -329,11 +334,15 @@
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  |          </el-table>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -      <div v-if="formData.planCycle==6 && formData.taskHasCompleted==1" slot="footer" class="dialog-footer">    
 | 
	
		
			
				|  |  | +      <div
 | 
	
		
			
				|  |  | +        v-if="formData.planCycle == 6 && formData.taskHasCompleted == 1"
 | 
	
		
			
				|  |  | +        slot="footer"
 | 
	
		
			
				|  |  | +        class="dialog-footer"
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  |          <span>存在已完成任务,无周期任务如需修改,请删除后重新下发。</span>
 | 
	
		
			
				|  |  |          <el-button @click="onHide">关闭</el-button>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -      <div v-else slot="footer" class="dialog-footer">        
 | 
	
		
			
				|  |  | +      <div v-else slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  |          <el-button type="primary" @click="onSubmit">确定</el-button>
 | 
	
		
			
				|  |  |          <el-button @click="onHide">取消</el-button>
 | 
	
		
			
				|  |  |        </div>
 | 
	
	
		
			
				|  | @@ -358,6 +367,7 @@ import { statusOptions } from "@/views/commonOption";
 | 
	
		
			
				|  |  |  import { findAllRole, findRoleByType } from "@/api/system/role";
 | 
	
		
			
				|  |  |  import { getLabel } from "@/views/commonOption";
 | 
	
		
			
				|  |  |  import DialogSelect from "@/views/safetycheck/ruleManager/dialog.select.point.vue";
 | 
	
		
			
				|  |  | +import dayjs from "dayjs";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    dicts: [
 | 
	
		
			
				|  |  |      "sys_org_type",
 | 
	
	
		
			
				|  | @@ -405,6 +415,13 @@ export default {
 | 
	
		
			
				|  |  |          endDate: [{ required: true, message: "请选择结束时间" }],
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        statusOptions: statusOptions,
 | 
	
		
			
				|  |  | +      datepickerOptions: {
 | 
	
		
			
				|  |  | +        disabledDate(time) {
 | 
	
		
			
				|  |  | +          const date = new Date();
 | 
	
		
			
				|  |  | +          date.setTime(date.getTime() - 3600 * 1000 * 24);
 | 
	
		
			
				|  |  | +          return time.getTime() < date;
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    props: {
 | 
	
	
		
			
				|  | @@ -573,7 +590,7 @@ export default {
 | 
	
		
			
				|  |  |          return false;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      if(this.formData.planCycle==6 && this.formData.taskHasCompleted==1){
 | 
	
		
			
				|  |  | +      if (this.formData.planCycle == 6 && this.formData.taskHasCompleted == 1) {
 | 
	
		
			
				|  |  |          return true;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -591,7 +608,7 @@ export default {
 | 
	
		
			
				|  |  |          return false;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      if(this.formData.planCycle==6 && this.formData.taskHasCompleted==1){
 | 
	
		
			
				|  |  | +      if (this.formData.planCycle == 6 && this.formData.taskHasCompleted == 1) {
 | 
	
		
			
				|  |  |          return true;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -835,23 +852,27 @@ export default {
 | 
	
		
			
				|  |  |      onSubmit() {
 | 
	
		
			
				|  |  |        this.$refs.form.validate(async (isValidate) => {
 | 
	
		
			
				|  |  |          if (!isValidate) return;
 | 
	
		
			
				|  |  | -        this.loading = true;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          // console.log(this.formData.hasEdit,"this.formData.hasEdit")
 | 
	
		
			
				|  |  |          this.formData.planCreateOrgId = this.orgId;
 | 
	
		
			
				|  |  |          this.formData.planCreateOrgName = this.orgName;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          this.formData.rulePointList =
 | 
	
		
			
				|  |  |            this.tableData == null ? [] : this.tableData;
 | 
	
		
			
				|  |  | -        // let rols = this.formData.roleList;
 | 
	
		
			
				|  |  | -        // let rolis = this.formData.roleIds;
 | 
	
		
			
				|  |  | -        // this.formData.roleList = null;
 | 
	
		
			
				|  |  | -        // this.formData.roleIds =
 | 
	
		
			
				|  |  | -        //   this.selectedValues.length == 0 ? null : this.selectedValues;
 | 
	
		
			
				|  |  | +        if (
 | 
	
		
			
				|  |  | +          this.formData.planCycle == "6" &&
 | 
	
		
			
				|  |  | +          dayjs(this.formData.endDate).isBefore(this.formData.startDate)
 | 
	
		
			
				|  |  | +        ) {
 | 
	
		
			
				|  |  | +          this.$message.info("开始时间不能晚于结束时间");
 | 
	
		
			
				|  |  | +          return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        // if (this.formData.planCycle == 6) {
 | 
	
		
			
				|  |  | -        //   this.formData.buildTaskNow = true;
 | 
	
		
			
				|  |  | -        // }
 | 
	
		
			
				|  |  | +        if(this.formData.rulePointList.length==0){
 | 
	
		
			
				|  |  | +          this.$message.info("请选择检查内容");
 | 
	
		
			
				|  |  | +          return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        this.loading = true;
 | 
	
		
			
				|  |  |          if (this.formData.planStatus == 1) {
 | 
	
		
			
				|  |  |            let msg;
 | 
	
		
			
				|  |  |            let imme;
 | 
	
	
		
			
				|  | @@ -914,4 +935,9 @@ export default {
 | 
	
		
			
				|  |  |    display: flex;
 | 
	
		
			
				|  |  |    align-items: center;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +.org-selector {
 | 
	
		
			
				|  |  | +  ::v-deep .tags-box {
 | 
	
		
			
				|  |  | +    width: calc(100% - 13px) !important;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 |