|
|
@@ -26,7 +26,7 @@
|
|
|
name="planName"
|
|
|
placeholder="请输入任务名称"
|
|
|
clearable
|
|
|
- style="width: 217px;max-height:33px"
|
|
|
+ style="width: 217px; max-height: 33px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -96,34 +96,57 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="6">
|
|
|
- <el-form-item prop="planStatus" label="计划状态:"> -->
|
|
|
- <!-- <el-select
|
|
|
- :disabled="getDistributePlanStatus()"
|
|
|
- prop="planStatus"
|
|
|
- label="计划状态"
|
|
|
- v-model="formData.planStatus"
|
|
|
- placeholder="请选择计划状态"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in dict.type.resumption_plan_status"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select> -->
|
|
|
- <!-- <el-switch
|
|
|
- v-model="formData.planStatus"
|
|
|
- active-value="1"
|
|
|
- inactive-value="0"
|
|
|
- ></el-switch> -->
|
|
|
- <!-- </el-form-item> -->
|
|
|
- <!-- </el-col> -->
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
+ <el-form-item prop="count" label="任务次数:">
|
|
|
+ <el-input-number
|
|
|
+ :disabled="cannotEdit()"
|
|
|
+ v-model="formData.count"
|
|
|
+ controls-position="right"
|
|
|
+ @change="handleChange"
|
|
|
+ :min="parentCount"
|
|
|
+ :max="9"
|
|
|
+ style="width: 217px"
|
|
|
+ ></el-input-number>
|
|
|
+ </el-form-item> </el-col
|
|
|
+ ><el-col :span="6">
|
|
|
+ <el-form-item
|
|
|
+ prop="startDate"
|
|
|
+ label="开始时间:"
|
|
|
+ v-if="formData.planCycle == 0"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ :disabled="cannotEdit()"
|
|
|
+ v-model="formData.startDate"
|
|
|
+ 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>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item
|
|
|
+ prop="endDate"
|
|
|
+ label="结束时间:"
|
|
|
+ v-if="formData.planCycle == 0"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ :disabled="cannotEdit()"
|
|
|
+ v-model="formData.endDate"
|
|
|
+ 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>
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item prop="execOrgType" label="机构类型:">
|
|
|
<el-select
|
|
|
:disabled="cannotEdit()"
|
|
|
@@ -163,18 +186,29 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item prop="count" label="任务次数:">
|
|
|
- <el-input-number
|
|
|
+ <el-form-item :span="6" prop="checkOrgIds" label="履职机构">
|
|
|
+ <org-tree-select
|
|
|
:disabled="cannotEdit()"
|
|
|
- style="margin-left: 10px"
|
|
|
- v-model="formData.count"
|
|
|
- controls-position="right"
|
|
|
- @change="handleChange"
|
|
|
- :min="parentCount"
|
|
|
- :max="9"
|
|
|
- ></el-input-number>
|
|
|
+ v-model="formData.orgList"
|
|
|
+ class="org-selector"
|
|
|
+ :queryData="parseInt(formData.execOrgType)"
|
|
|
+ :enabledCheckOrgTypes="parseInt(formData.execOrgType)"
|
|
|
+ :disable="true"
|
|
|
+ >
|
|
|
+ </org-tree-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" v-if="formData.planCycle==0">
|
|
|
+ <el-form-item prop="note" label="备注">
|
|
|
+ <el-input
|
|
|
+ :disabled="cannotEdit()"
|
|
|
+ v-model="formData.note"
|
|
|
+ :maxlength="255"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入备注"
|
|
|
+ style="width:calc(100% - 17px)"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="6">
|
|
|
@@ -195,26 +229,31 @@
|
|
|
</el-form-item>
|
|
|
</el-col> -->
|
|
|
</el-row>
|
|
|
- <el-form-item prop="note" label="备注">
|
|
|
- <el-input
|
|
|
- :disabled="cannotEdit()"
|
|
|
- v-model="formData.note"
|
|
|
- :maxlength="255"
|
|
|
- clearable
|
|
|
- placeholder="请输入备注"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item prop="note" label="备注" v-if="formData.planCycle!=0">
|
|
|
+ <el-input
|
|
|
+ :disabled="cannotEdit()"
|
|
|
+ v-model="formData.note"
|
|
|
+ :maxlength="255"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入备注"
|
|
|
+ style="width:calc(100% - 17px)"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
</el-form>
|
|
|
- <el-button
|
|
|
- @click="openSelect"
|
|
|
- v-if="formData.id == null || formData.planOfOrgId == orgId"
|
|
|
- ><span class="requiredlabel">选择履职内容</span></el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- @click="deleteSelected"
|
|
|
- v-if="formData.id == null || formData.planOfOrgId == orgId"
|
|
|
- >批量删除</el-button
|
|
|
- >
|
|
|
+ <div style="margin-bottom: 10px">
|
|
|
+ <el-button
|
|
|
+ @click="openSelect"
|
|
|
+ v-if="formData.id == null || formData.planOfOrgId == orgId"
|
|
|
+ ><span class="requiredlabel">选择履职内容</span></el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="deleteSelected"
|
|
|
+ v-if="formData.id == null || formData.planOfOrgId == orgId"
|
|
|
+ >批量删除</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
@@ -291,7 +330,7 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top: 10px">
|
|
|
<el-button type="primary" @click="onSubmit">确定</el-button>
|
|
|
<el-button @click="onHide">取消</el-button>
|
|
|
</div>
|
|
|
@@ -313,6 +352,7 @@ import { statusOptions } from "./../../commonOption";
|
|
|
import { findAllRole } from "@/api/system/role";
|
|
|
import DialogSelect from "@/views/resumption/ruleManager/dialog.select.point.vue";
|
|
|
import DialogThreeState from "@/components/message/threeStateMessageBox.vue";
|
|
|
+import OrgTreeSelect from "@/components/orgTreeSelect";
|
|
|
export default {
|
|
|
dicts: [
|
|
|
"resumption_plan_type",
|
|
|
@@ -399,8 +439,17 @@ export default {
|
|
|
],
|
|
|
planExec: [{ required: true, message: "请选择任务时间" }],
|
|
|
count: [{ required: true, message: "请选择任务次数" }],
|
|
|
+ startDate: [{ required: true, message: "请选择开始时间" }],
|
|
|
+ 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: {
|
|
|
@@ -523,6 +572,10 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ if (this.formData.planCycle == 0 && this.formData.taskHasCompleted == 1) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
if (this.formData.planOfOrgId != this.orgId) {
|
|
|
return true;
|
|
|
}
|
|
|
@@ -537,6 +590,10 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ if (this.formData.planCycle == 0 && this.formData.taskHasCompleted == 1) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
let r =
|
|
|
this.formData.planOfOrgId != this.orgId ||
|
|
|
this.formData.planCreateOrgId != this.orgId;
|
|
|
@@ -844,7 +901,6 @@ export default {
|
|
|
// this.formData.planStatus = 0;
|
|
|
// this.isSubmitting = true;
|
|
|
// this.formData.note = this.formData.description;
|
|
|
-
|
|
|
|
|
|
this.formData.itemList = this.tableData == null ? [] : this.tableData;
|
|
|
//新需求,自动填充角色
|
|
|
@@ -860,6 +916,13 @@ export default {
|
|
|
// this.formData.roleList =
|
|
|
// this.selectedValues.length == 0 ? null : this.selectedValues;
|
|
|
//停用、使用中编辑
|
|
|
+ if (
|
|
|
+ this.formData.planCycle == "0" &&
|
|
|
+ dayjs(this.formData.endDate).isBefore(this.formData.startDate)
|
|
|
+ ) {
|
|
|
+ this.$message.info("开始时间不能晚于结束时间");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
if (this.formData.planStatus == "1") {
|
|
|
let msg;
|
|
|
@@ -915,7 +978,7 @@ export default {
|
|
|
//apimark//
|
|
|
},
|
|
|
mounted() {},
|
|
|
- components: { DialogSelect, DialogThreeState },
|
|
|
+ components: { DialogSelect, DialogThreeState, OrgTreeSelect },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
@@ -935,4 +998,15 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+.org-selector {
|
|
|
+ ::v-deep .el-popover__reference-wrapper {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ ::v-deep .tags-box {
|
|
|
+ width: calc(100% - 18px) !important;
|
|
|
+ min-height: 33px;
|
|
|
+ max-height: 33px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|