|  | @@ -28,15 +28,15 @@
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  | -              <el-form-item prop="planType" label="检查类型:">
 | 
	
		
			
				|  |  | +              <el-form-item prop="checkType" label="检查类型:">
 | 
	
		
			
				|  |  |                  <el-select
 | 
	
		
			
				|  |  |                    label="检查类型"
 | 
	
		
			
				|  |  | -                  v-model="formData.planType"
 | 
	
		
			
				|  |  | +                  v-model="formData.checkType"
 | 
	
		
			
				|  |  |                    placeholder="请选择检查类型"
 | 
	
		
			
				|  |  |                    clearable
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    <el-option
 | 
	
		
			
				|  |  | -                    v-for="dict in dict.type.resumption_plan_type"
 | 
	
		
			
				|  |  | +                    v-for="dict in dict.type.check_type"
 | 
	
		
			
				|  |  |                      :key="dict.value"
 | 
	
		
			
				|  |  |                      :label="dict.label"
 | 
	
		
			
				|  |  |                      :value="dict.value"
 | 
	
	
		
			
				|  | @@ -55,7 +55,7 @@
 | 
	
		
			
				|  |  |                    clearable
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in dict.type.resumption_plan_cycle"
 | 
	
		
			
				|  |  | +                    v-for="item in dict.type.check_cycle"
 | 
	
		
			
				|  |  |                      :key="item.value"
 | 
	
		
			
				|  |  |                      :label="item.label"
 | 
	
		
			
				|  |  |                      :value="item.value"
 | 
	
	
		
			
				|  | @@ -65,16 +65,16 @@
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  | -              <el-form-item prop="planStatus" label="检查机构类型:">
 | 
	
		
			
				|  |  | +              <el-form-item prop="execOrgType" label="检查机构类型:">
 | 
	
		
			
				|  |  |                  <el-select
 | 
	
		
			
				|  |  | -                  prop="planStatus"
 | 
	
		
			
				|  |  | +                  prop="execOrgType"
 | 
	
		
			
				|  |  |                    label="检查机构类型"
 | 
	
		
			
				|  |  | -                  v-model="formData.planStatus"
 | 
	
		
			
				|  |  | +                  v-model="formData.execOrgType"
 | 
	
		
			
				|  |  |                    placeholder="请选择检查机构类型"
 | 
	
		
			
				|  |  |                    clearable
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in dict.type.resumption_plan_status"
 | 
	
		
			
				|  |  | +                    v-for="item in dict.type.sys_org_type"
 | 
	
		
			
				|  |  |                      :key="item.value"
 | 
	
		
			
				|  |  |                      :label="item.label"
 | 
	
		
			
				|  |  |                      :value="item.value"
 | 
	
	
		
			
				|  | @@ -86,37 +86,18 @@
 | 
	
		
			
				|  |  |            </el-row>
 | 
	
		
			
				|  |  |            <el-row>
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  | -              <el-form-item prop="execOrgType" label="检查角色:">
 | 
	
		
			
				|  |  | +              <el-form-item prop="roleIds" label="检查角色:">
 | 
	
		
			
				|  |  |                  <el-select
 | 
	
		
			
				|  |  | +                  @visible-change="getRolesByOrg"
 | 
	
		
			
				|  |  |                    label="检查角色"
 | 
	
		
			
				|  |  | -                  v-model="formData.execOrgType"
 | 
	
		
			
				|  |  | +                  v-model="formData.roleIds"
 | 
	
		
			
				|  |  |                    placeholder="请选择检查角色"
 | 
	
		
			
				|  |  | -                  @change="onOrgTypeChanged"
 | 
	
		
			
				|  |  | -                  clearable
 | 
	
		
			
				|  |  | -                >
 | 
	
		
			
				|  |  | -                  <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in dict.type.sys_org_type"
 | 
	
		
			
				|  |  | -                    :key="item.value"
 | 
	
		
			
				|  |  | -                    :label="item.label"
 | 
	
		
			
				|  |  | -                    :value="item.value"
 | 
	
		
			
				|  |  | -                  >
 | 
	
		
			
				|  |  | -                  </el-option>
 | 
	
		
			
				|  |  | -                </el-select>
 | 
	
		
			
				|  |  | -              </el-form-item>
 | 
	
		
			
				|  |  | -            </el-col>
 | 
	
		
			
				|  |  | -            <el-col :span="6">
 | 
	
		
			
				|  |  | -              <el-form-item prop="roleList" label="受检机构类型:">
 | 
	
		
			
				|  |  | -                <el-select
 | 
	
		
			
				|  |  | -                  
 | 
	
		
			
				|  |  | -                  label="受检机构类型"
 | 
	
		
			
				|  |  | -                  v-model="formData.roleList"
 | 
	
		
			
				|  |  | -                  placeholder="请选择受检机构类型"
 | 
	
		
			
				|  |  |                    multiple
 | 
	
		
			
				|  |  |                    filterable
 | 
	
		
			
				|  |  |                    @change="handleRolesChange"
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in resumptionRoles"
 | 
	
		
			
				|  |  | +                    v-for="item in planRoles"
 | 
	
		
			
				|  |  |                      :key="item.id"
 | 
	
		
			
				|  |  |                      :label="item.name"
 | 
	
		
			
				|  |  |                      :value="item.id"
 | 
	
	
		
			
				|  | @@ -126,15 +107,16 @@
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  | -              <el-form-item prop="planExec" label="检查次数:">
 | 
	
		
			
				|  |  | +              <el-form-item prop="checkOrgType" label="受检机构类型:">
 | 
	
		
			
				|  |  |                  <el-select
 | 
	
		
			
				|  |  | -                  label="检查次数"
 | 
	
		
			
				|  |  | -                  v-model="formData.planExec"
 | 
	
		
			
				|  |  | -                  placeholder="请选择检查次数"
 | 
	
		
			
				|  |  | +                  prop="checkOrgType"
 | 
	
		
			
				|  |  | +                  label="受检机构类型"
 | 
	
		
			
				|  |  | +                  v-model="formData.checkOrgType"
 | 
	
		
			
				|  |  | +                  placeholder="请选择受检机构类型"
 | 
	
		
			
				|  |  |                    clearable
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in dict.type.resumption_plan_exec"
 | 
	
		
			
				|  |  | +                    v-for="item in dict.type.sys_org_type"
 | 
	
		
			
				|  |  |                      :key="item.value"
 | 
	
		
			
				|  |  |                      :label="item.label"
 | 
	
		
			
				|  |  |                      :value="item.value"
 | 
	
	
		
			
				|  | @@ -144,7 +126,7 @@
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  | -              <el-form-item prop="count" label="立即生效:">
 | 
	
		
			
				|  |  | +              <el-form-item prop="count" label="检查次数:">
 | 
	
		
			
				|  |  |                  <el-input-number
 | 
	
		
			
				|  |  |                    style="margin-left: 10px"
 | 
	
		
			
				|  |  |                    v-model="formData.count"
 | 
	
	
		
			
				|  | @@ -155,104 +137,94 @@
 | 
	
		
			
				|  |  |                  ></el-input-number>
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
		
			
				|  |  | +            <el-col :span="6">
 | 
	
		
			
				|  |  | +              <el-form-item prop="buildTaskNow" label="立即生效:">
 | 
	
		
			
				|  |  | +                <el-checkbox
 | 
	
		
			
				|  |  | +                  v-model="formData.buildTaskNow"
 | 
	
		
			
				|  |  | +                  size="medium"
 | 
	
		
			
				|  |  | +                  @change="handleCheckboxChange"
 | 
	
		
			
				|  |  | +                  >勾选后当前周期开始生效</el-checkbox
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  | +              </el-form-item>
 | 
	
		
			
				|  |  | +            </el-col>
 | 
	
		
			
				|  |  |            </el-row>
 | 
	
		
			
				|  |  |            <el-row>
 | 
	
		
			
				|  |  |              <el-col :span="6">
 | 
	
		
			
				|  |  | -          <el-form-item  prop="note" label="计划状态">
 | 
	
		
			
				|  |  | -            <el-select
 | 
	
		
			
				|  |  | +              <el-form-item prop="planStatus" label="计划状态">
 | 
	
		
			
				|  |  | +                <el-select
 | 
	
		
			
				|  |  |                    label="计划状态"
 | 
	
		
			
				|  |  | -                  v-model="formData.execOrgType"
 | 
	
		
			
				|  |  | +                  v-model="formData.planStatus"
 | 
	
		
			
				|  |  |                    placeholder="请选择计划状态"
 | 
	
		
			
				|  |  | -                  @change="onOrgTypeChanged"
 | 
	
		
			
				|  |  |                    clearable
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in dict.type.sys_org_type"
 | 
	
		
			
				|  |  | +                    v-for="item in dict.type.check_status"
 | 
	
		
			
				|  |  |                      :key="item.value"
 | 
	
		
			
				|  |  |                      :label="item.label"
 | 
	
		
			
				|  |  |                      :value="item.value"
 | 
	
		
			
				|  |  |                    >
 | 
	
		
			
				|  |  |                    </el-option>
 | 
	
		
			
				|  |  |                  </el-select>
 | 
	
		
			
				|  |  | -          </el-form-item>
 | 
	
		
			
				|  |  | -        </el-col>
 | 
	
		
			
				|  |  | -        <el-col :span="6">
 | 
	
		
			
				|  |  | -          <el-form-item :span="6" prop="note" label="检查机构">
 | 
	
		
			
				|  |  | -            <el-select
 | 
	
		
			
				|  |  | -                  label="检查机构"
 | 
	
		
			
				|  |  | -                  v-model="formData.execOrgType"
 | 
	
		
			
				|  |  | -                  placeholder="请选择检查机构"
 | 
	
		
			
				|  |  | -                  @change="onOrgTypeChanged"
 | 
	
		
			
				|  |  | -                  clearable
 | 
	
		
			
				|  |  | -                >
 | 
	
		
			
				|  |  | -                  <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in dict.type.sys_org_type"
 | 
	
		
			
				|  |  | -                    :key="item.value"
 | 
	
		
			
				|  |  | -                    :label="item.label"
 | 
	
		
			
				|  |  | -                    :value="item.value"
 | 
	
		
			
				|  |  | -                  >
 | 
	
		
			
				|  |  | -                  </el-option>
 | 
	
		
			
				|  |  | -                </el-select>
 | 
	
		
			
				|  |  | -          </el-form-item>
 | 
	
		
			
				|  |  | -        </el-col>
 | 
	
		
			
				|  |  | -        <el-col :span="6">
 | 
	
		
			
				|  |  | -          <el-form-item :span="6" prop="note" label="受检机构">
 | 
	
		
			
				|  |  | -            <el-select
 | 
	
		
			
				|  |  | -                  label="受检机构"
 | 
	
		
			
				|  |  | -                  v-model="formData.execOrgType"
 | 
	
		
			
				|  |  | -                  placeholder="请选择受检机构"
 | 
	
		
			
				|  |  | -                  @change="onOrgTypeChanged"
 | 
	
		
			
				|  |  | -                  clearable
 | 
	
		
			
				|  |  | -                >
 | 
	
		
			
				|  |  | -                  <el-option
 | 
	
		
			
				|  |  | -                    v-for="item in dict.type.sys_org_type"
 | 
	
		
			
				|  |  | -                    :key="item.value"
 | 
	
		
			
				|  |  | -                    :label="item.label"
 | 
	
		
			
				|  |  | -                    :value="item.value"
 | 
	
		
			
				|  |  | -                  >
 | 
	
		
			
				|  |  | -                  </el-option>
 | 
	
		
			
				|  |  | -                </el-select>
 | 
	
		
			
				|  |  | -          </el-form-item>
 | 
	
		
			
				|  |  | -        </el-col>
 | 
	
		
			
				|  |  | -          
 | 
	
		
			
				|  |  | -        </el-row>
 | 
	
		
			
				|  |  | -        <el-form-item :span="6" prop="note" label="备注">
 | 
	
		
			
				|  |  | +              </el-form-item>
 | 
	
		
			
				|  |  | +            </el-col>
 | 
	
		
			
				|  |  | +            <el-col :span="6">
 | 
	
		
			
				|  |  | +              <el-form-item :span="6" prop="execOrg" label="检查机构">
 | 
	
		
			
				|  |  | +                <orgDropDown
 | 
	
		
			
				|  |  | +                  v-model="formData.execOrg"
 | 
	
		
			
				|  |  | +                  placeholder="选择检查机构"
 | 
	
		
			
				|  |  | +                  @select="onexecOrgSelect"
 | 
	
		
			
				|  |  | +                />
 | 
	
		
			
				|  |  | +              </el-form-item>
 | 
	
		
			
				|  |  | +            </el-col>
 | 
	
		
			
				|  |  | +            <el-col :span="6">
 | 
	
		
			
				|  |  | +              <el-form-item :span="6" prop="checkOrg" label="受检机构">
 | 
	
		
			
				|  |  | +                <orgDropDown
 | 
	
		
			
				|  |  | +                  v-model="formData.checkOrg"
 | 
	
		
			
				|  |  | +                  placeholder="选择受检机构"
 | 
	
		
			
				|  |  | +                  @select="oncheckOrgSelect"
 | 
	
		
			
				|  |  | +                />
 | 
	
		
			
				|  |  | +              </el-form-item>
 | 
	
		
			
				|  |  | +            </el-col>
 | 
	
		
			
				|  |  | +          </el-row>
 | 
	
		
			
				|  |  | +          <el-form-item :span="6" prop="description" label="备注">
 | 
	
		
			
				|  |  |              <el-input
 | 
	
		
			
				|  |  | -              v-model="formData.note"
 | 
	
		
			
				|  |  | +              v-model="formData.description"
 | 
	
		
			
				|  |  |                :maxlength="255"
 | 
	
		
			
				|  |  |                clearable
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  |            </el-form-item>
 | 
	
		
			
				|  |  |          </el-form>
 | 
	
		
			
				|  |  |          <el-button @click="openSelect">新增检查内容</el-button>
 | 
	
		
			
				|  |  | -       
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          <el-table :data="tableData" style="width: 100%" height="400px">
 | 
	
		
			
				|  |  | -          <el-table-column  label="是否扫描" >
 | 
	
		
			
				|  |  | -            <template v-slot="{ row }"> 
 | 
	
		
			
				|  |  | +          <el-table-column label="是否扫描">
 | 
	
		
			
				|  |  | +            <template v-slot="{ row }">
 | 
	
		
			
				|  |  |                <el-switch
 | 
	
		
			
				|  |  |                  v-model="row.pointScan"
 | 
	
		
			
				|  |  |                  active-text="是"
 | 
	
		
			
				|  |  | -                inactive-text="否">
 | 
	
		
			
				|  |  | +                inactive-text="否"
 | 
	
		
			
				|  |  | +              >
 | 
	
		
			
				|  |  |                </el-switch>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -          <el-table-column label="是否必检" >
 | 
	
		
			
				|  |  | -            <template v-slot="{ row }"> 
 | 
	
		
			
				|  |  | +          <el-table-column label="是否必检">
 | 
	
		
			
				|  |  | +            <template v-slot="{ row }">
 | 
	
		
			
				|  |  |                <el-switch
 | 
	
		
			
				|  |  |                  v-model="row.required"
 | 
	
		
			
				|  |  |                  active-text="是"
 | 
	
		
			
				|  |  | -                inactive-text="否">
 | 
	
		
			
				|  |  | +                inactive-text="否"
 | 
	
		
			
				|  |  | +              >
 | 
	
		
			
				|  |  |                </el-switch>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="ruleName" label="检查手册" > </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="itemName" label="检查项" > </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="pointName" label="检查内容" > </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="areaName" label="检查区域" > </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="areaName" label="数据来源" > </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column prop="areaName" label="操作" >
 | 
	
		
			
				|  |  | -            <template v-slot="{ row }"> 
 | 
	
		
			
				|  |  | +          <el-table-column prop="ruleName" label="检查手册"> </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column prop="itemName" label="检查项"> </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column prop="pointName" label="检查内容"> </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column prop="areaName" label="检查区域"> </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column prop="areaName" label="数据来源"> </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column prop="areaName" label="操作">
 | 
	
		
			
				|  |  | +            <template v-slot="{ row }">
 | 
	
		
			
				|  |  |                <el-button type="text" @click="removeRow(row)">删除</el-button>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
	
		
			
				|  | @@ -265,29 +237,23 @@
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  |      <DialogSelect
 | 
	
		
			
				|  |  | -          ref="DialogSelect"
 | 
	
		
			
				|  |  | -          :defaultSelect=defaultSelect
 | 
	
		
			
				|  |  | -          :orgType="formData.execOrgType"
 | 
	
		
			
				|  |  | -          @select="onSelect"
 | 
	
		
			
				|  |  | -        ></DialogSelect>
 | 
	
		
			
				|  |  | +      ref="DialogSelect"
 | 
	
		
			
				|  |  | +      :defaultSelect="defaultSelect"
 | 
	
		
			
				|  |  | +      :orgType="formData.execOrgType"
 | 
	
		
			
				|  |  | +      @select="onSelect"
 | 
	
		
			
				|  |  | +    ></DialogSelect>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import { mapGetters } from "vuex";
 | 
	
		
			
				|  |  | -import * as api from "@/api/resumption/plan";
 | 
	
		
			
				|  |  | +import orgDropDown from "@/components/orgTree/orgDropDown.vue";
 | 
	
		
			
				|  |  | +import * as api from "@/api/safetycheck/plan";
 | 
	
		
			
				|  |  |  import { statusOptions } from "@/views/commonOption";
 | 
	
		
			
				|  |  |  import { findAllRole } from "@/api/system/role";
 | 
	
		
			
				|  |  |  import DialogSelect from "@/views/safetycheck/ruleManager/dialog.select.point.vue";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  dicts: [
 | 
	
		
			
				|  |  | -    "resumption_plan_type",
 | 
	
		
			
				|  |  | -    "resumption_plan_cycle",
 | 
	
		
			
				|  |  | -    "resumption_org_type",
 | 
	
		
			
				|  |  | -    "resumption_plan_status",
 | 
	
		
			
				|  |  | -    "sys_org_type",
 | 
	
		
			
				|  |  | -    "resumption_plan_exec",
 | 
	
		
			
				|  |  | -  ],
 | 
	
		
			
				|  |  | +  dicts: ["sys_org_type", "check_type", "check_cycle", "check_status"],
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      // const params = this.$route.params;
 | 
	
		
			
				|  |  |      // let o1=options;
 | 
	
	
		
			
				|  | @@ -296,7 +262,7 @@ export default {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        defaultSelect: [],
 | 
	
		
			
				|  |  |        selectedValues: [],
 | 
	
		
			
				|  |  | -      resumptionRoles: [],
 | 
	
		
			
				|  |  | +      planRoles: [],
 | 
	
		
			
				|  |  |        planName: null,
 | 
	
		
			
				|  |  |        planType: null,
 | 
	
		
			
				|  |  |        planCycle: null,
 | 
	
	
		
			
				|  | @@ -373,6 +339,17 @@ export default {
 | 
	
		
			
				|  |  |      ...mapGetters(["orgId", "orgName"]),
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    handleCheckboxChange() {
 | 
	
		
			
				|  |  | +      this.formData.buildTaskNow = !this.formData.buildTaskNow;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onexecOrgSelect(node) {
 | 
	
		
			
				|  |  | +      this.formData.execOrg = node.id;
 | 
	
		
			
				|  |  | +      console.log(node, "onexecOrgSelect");
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    oncheckOrgSelect(node) {
 | 
	
		
			
				|  |  | +      this.formData.checkOrg = node.id;
 | 
	
		
			
				|  |  | +      console.log(node, "oncheckOrgSelect");
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      reset() {
 | 
	
		
			
				|  |  |        return {
 | 
	
		
			
				|  |  |          planName: null,
 | 
	
	
		
			
				|  | @@ -391,78 +368,81 @@ export default {
 | 
	
		
			
				|  |  |          planCreateOrgId: null,
 | 
	
		
			
				|  |  |          planCreateOrgName: null,
 | 
	
		
			
				|  |  |          roleList: null,
 | 
	
		
			
				|  |  | +        roleIds: null,
 | 
	
		
			
				|  |  | +        execOrg: null,
 | 
	
		
			
				|  |  | +        checkOrg: null,
 | 
	
		
			
				|  |  | +        buildTaskNow: false,
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getRolesByOrg() {
 | 
	
		
			
				|  |  | +      // console.log("开始获取角色")
 | 
	
		
			
				|  |  |        let params = {
 | 
	
		
			
				|  |  | -        orgType: this.formData.execOrgType,
 | 
	
		
			
				|  |  | +        orgType: null,
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |        findAllRole(params).then((res) => {
 | 
	
		
			
				|  |  |          // console.info(res);
 | 
	
		
			
				|  |  | -        this.resumptionRoles = res.data;
 | 
	
		
			
				|  |  | +        this.planRoles = res.data;
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      handleChange(value) {
 | 
	
		
			
				|  |  | -      console.log(value);
 | 
	
		
			
				|  |  | +      // console.log(value);
 | 
	
		
			
				|  |  |        this.count = value;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      async refresh(id, other) {
 | 
	
		
			
				|  |  |        this.formData = id ? (await api.get(id)).data : this.reset(other);
 | 
	
		
			
				|  |  | -      if(this.formData.execOrgType){
 | 
	
		
			
				|  |  | +      if (this.formData.execOrgType) {
 | 
	
		
			
				|  |  | +        this.formData.roleIds=this.formData.roleList.map(role => role.id);
 | 
	
		
			
				|  |  |          this.getRolesByOrg();
 | 
	
		
			
				|  |  | -      } 
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onSelect(selectList){
 | 
	
		
			
				|  |  | +    onSelect(selectList) {
 | 
	
		
			
				|  |  |        console.log(selectList);
 | 
	
		
			
				|  |  | -      for(let i=0;i<selectList.length;i++){
 | 
	
		
			
				|  |  | -        let tem={
 | 
	
		
			
				|  |  | -          pointScan:!selectList[i].pointScan,
 | 
	
		
			
				|  |  | -          required:!selectList[i].required,
 | 
	
		
			
				|  |  | -          ruleName:selectList[i].ruleName,
 | 
	
		
			
				|  |  | -          itemName:selectList[i].itemName,
 | 
	
		
			
				|  |  | -          pointName:selectList[i].pointName,
 | 
	
		
			
				|  |  | -          areaName:selectList[i].areaName,
 | 
	
		
			
				|  |  | -          itemId:selectList[i].itemId,
 | 
	
		
			
				|  |  | -          id:selectList[i].id,
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        if(this.tableData==null){
 | 
	
		
			
				|  |  | -          this.tableData=[];
 | 
	
		
			
				|  |  | +      for (let i = 0; i < selectList.length; i++) {
 | 
	
		
			
				|  |  | +        let tem = {
 | 
	
		
			
				|  |  | +          pointScan: !selectList[i].pointScan,
 | 
	
		
			
				|  |  | +          required: !selectList[i].required,
 | 
	
		
			
				|  |  | +          ruleName: selectList[i].ruleName,
 | 
	
		
			
				|  |  | +          itemName: selectList[i].itemName,
 | 
	
		
			
				|  |  | +          pointName: selectList[i].pointName,
 | 
	
		
			
				|  |  | +          areaName: selectList[i].areaName,
 | 
	
		
			
				|  |  | +          itemId: selectList[i].itemId,
 | 
	
		
			
				|  |  | +          id: selectList[i].id,
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +        if (this.tableData == null) {
 | 
	
		
			
				|  |  | +          this.tableData = [];
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          this.tableData.push(tem);
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -     
 | 
	
		
			
				|  |  | -      
 | 
	
		
			
				|  |  | -      
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onOrgTypeChanged(){
 | 
	
		
			
				|  |  | +    onOrgTypeChanged() {
 | 
	
		
			
				|  |  |        this.getRolesByOrg();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      async show(id, other = {}) {
 | 
	
		
			
				|  |  |        this.id = id;
 | 
	
		
			
				|  |  |        this.tableData = null;
 | 
	
		
			
				|  |  | -      this.formData.itemList = null;
 | 
	
		
			
				|  |  | +      this.formData.itemList = {};
 | 
	
		
			
				|  |  |        await this.refresh(id, other);
 | 
	
		
			
				|  |  |        console.log(id);
 | 
	
		
			
				|  |  |        if (id !== undefined) {
 | 
	
		
			
				|  |  |          await api.get(id).then((res) => {
 | 
	
		
			
				|  |  | -          console.log(res);
 | 
	
		
			
				|  |  | +          // console.log(res);
 | 
	
		
			
				|  |  |            this.tableData = res.data.itemList;
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +      this.getRolesByOrg();
 | 
	
		
			
				|  |  |        this.isShow = true;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      removeRow(row) {
 | 
	
		
			
				|  |  | -      this.tableData = this.tableData.filter(item => item !== row)
 | 
	
		
			
				|  |  | +      this.tableData = this.tableData.filter((item) => item !== row);
 | 
	
		
			
				|  |  |        // this.tableData.splice(index, 1);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 事件
 | 
	
		
			
				|  |  |      onHide() {
 | 
	
		
			
				|  |  |        this.isShow = false;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getIteamF(){
 | 
	
		
			
				|  |  | -      if(this.id==null){
 | 
	
		
			
				|  |  | -        this.defaultSelect=[];
 | 
	
		
			
				|  |  | +    getIteamF() {
 | 
	
		
			
				|  |  | +      if (this.id == null) {
 | 
	
		
			
				|  |  | +        this.defaultSelect = [];
 | 
	
		
			
				|  |  |          return;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        api.getPointIds(this.id).then((res) => {
 | 
	
	
		
			
				|  | @@ -470,7 +450,6 @@ export default {
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      openSelect() {
 | 
	
		
			
				|  |  | -      
 | 
	
		
			
				|  |  |        this.getIteamF();
 | 
	
		
			
				|  |  |        this.$refs.DialogSelect.show();
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -481,8 +460,17 @@ export default {
 | 
	
		
			
				|  |  |          this.formData.planCreateOrgName = this.orgName;
 | 
	
		
			
				|  |  |          if (!isValidate) return;
 | 
	
		
			
				|  |  |          this.formData.itemList = this.tableData == null ? [] : this.tableData;
 | 
	
		
			
				|  |  | -        this.formData.roleList = this.selectedValues.length==0?null:this.selectedValues;
 | 
	
		
			
				|  |  | -        await api.update(this.formData);
 | 
	
		
			
				|  |  | +        this.formData.roleList = null;
 | 
	
		
			
				|  |  | +        // console.log(this.selectedValues,"selectedValues");
 | 
	
		
			
				|  |  | +        this.formData.roleIds =
 | 
	
		
			
				|  |  | +          this.selectedValues.length == 0 ? null : this.selectedValues;
 | 
	
		
			
				|  |  | +        this.formData.buildTaskNow = this.formData.buildTaskNow ? 1 : 0;
 | 
	
		
			
				|  |  | +        if (this.id == undefined) {
 | 
	
		
			
				|  |  | +          await api.add(this.formData);
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          await api.update(this.formData);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          this.$emit("success");
 | 
	
		
			
				|  |  |          this.onHide();
 | 
	
		
			
				|  |  |        });
 | 
	
	
		
			
				|  | @@ -494,7 +482,7 @@ export default {
 | 
	
		
			
				|  |  |      //apimark//
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mounted() {},
 | 
	
		
			
				|  |  | -  components: {DialogSelect},
 | 
	
		
			
				|  |  | +  components: { DialogSelect, orgDropDown },
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 |