From df06d5adebeedb5edca6264450671792ccbd9d4e Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Mon, 26 Sep 2022 16:19:36 +0800
Subject: [PATCH] 修改
---
src/views/specialWorkSystem/workFlow/approveRule/components/approveItemDialog.vue | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/views/specialWorkSystem/workFlow/approveRule/components/approveItemDialog.vue b/src/views/specialWorkSystem/workFlow/approveRule/components/approveItemDialog.vue
index 6f92adb..355aef7 100644
--- a/src/views/specialWorkSystem/workFlow/approveRule/components/approveItemDialog.vue
+++ b/src/views/specialWorkSystem/workFlow/approveRule/components/approveItemDialog.vue
@@ -20,10 +20,10 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
- <el-col v-if="approveItemForm.type === 2 || approveItemForm.type === 3" :span="24" style="margin-bottom: 24px">
+ <el-col v-if="(approveItemForm.type === 2 || approveItemForm.type === 3) && personType !== 3" :span="24" style="margin-bottom: 24px">
<el-form-item label="措施名称" prop="measureId">
<el-select v-model="approveItemForm.measureId" placeholder="请选择措施" class="input-add" clearable filterable>
- <el-option v-for="item in actionList" :key="item.id" :value="item.id" :label="item.context"></el-option>
+ <el-option v-for="item in approveTypeList" :key="item.id" :value="item.id" :label="item.context"></el-option>
</el-select>
</el-form-item>
</el-col>
@@ -44,12 +44,8 @@
</template>
<script lang="ts">
-import { reactive, toRefs, ref, onMounted, nextTick } from 'vue';
+import { reactive, toRefs, ref, nextTick } from 'vue';
import { ElMessage } from 'element-plus/es';
-import { userApi } from '/@/api/systemManage/user';
-import { safetyActionApi } from '/@/api/specialWorkSystem/safetyAction';
-import approveRule from '/@/views/specialWorkSystem/workFlow/approveRule/index.vue';
-import { approveBasicApi } from '/@/api/specialWorkSystem/approveBasic/index';
interface dataState {
title: string;
activeName: string;
@@ -58,9 +54,11 @@
approveItemFormRule: {};
actionList: Array<type>;
typeList: Array<type>;
+ approveTypeList: Array<type>;
smTypeList: Array<type>;
standardList: [];
order: number | null;
+ personType: number | null;
}
interface step {
itemName: string | null;
@@ -72,6 +70,7 @@
interface type {
id: number;
name: string;
+ type?:number;
}
export default {
name: 'approveItemDialog',
@@ -97,12 +96,14 @@
},
actionList: [],
typeList: [],
+ approveTypeList: [],
smTypeList: [
{ id: 1, name: '标准' },
{ id: 2, name: '措施' }
],
standardList: [],
- order: null
+ order: null,
+ personType: null,
});
const showApproveItemDialog = (type: string, value: {}, index: number, approveLevelForm: { type: number }, standardList: [], actionList: []) => {
@@ -111,12 +112,13 @@
data.actionList = actionList;
data.order = index;
if (approveLevelForm.type === 3) {
+ data.personType = 3
data.typeList = [
{ id: 1, name: '数值' },
- { id: 2, name: '选项' },
{ id: 3, name: '填空' }
];
} else {
+ data.personType = 2
data.typeList = [
{ id: 2, name: '选项' },
{ id: 3, name: '填空' }
@@ -158,8 +160,12 @@
const clearValue = () => {
if (data.approveItemForm.type === 1) {
data.approveItemForm.measureId = null;
+ }else if(data.approveItemForm.type === 2){
+ data.approveItemForm.standId = null;
+ data.approveTypeList = data.actionList.filter(item => item.type === 1)
} else {
data.approveItemForm.standId = null;
+ data.approveTypeList = data.actionList.filter(item => item.type === 2)
}
};
--
Gitblit v1.9.2