From 17600f41d7c3f6c28cc5393dbb4d3d7e82eccad6 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期四, 25 八月 2022 09:54:47 +0800
Subject: [PATCH] conflict
---
src/views/goalManagement/targetEscalation/index.vue | 59 ++++++++++++++++++++++++++++++-----------------------------
1 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/src/views/goalManagement/targetEscalation/index.vue b/src/views/goalManagement/targetEscalation/index.vue
index d39c1f4..cc522b6 100644
--- a/src/views/goalManagement/targetEscalation/index.vue
+++ b/src/views/goalManagement/targetEscalation/index.vue
@@ -24,7 +24,6 @@
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="检查" name="1"> </el-tab-pane>
<el-tab-pane label="上报" name="2"></el-tab-pane>
- <el-tab-pane label="审核" name="3"></el-tab-pane>
</el-tabs>
<el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
<el-table-column label="安全目标指标" align="center" property="qName" sortable />
@@ -33,18 +32,18 @@
<el-table-column property="value" label="指标值" align="center" sortable show-overflow-tooltip />
<el-table-column v-if="activeName == 1" label="操作" align="center" show-overflow-tooltip>
<template #default="scope">
- <el-button link type="primary" size="default" :icon="EditPen" @click="jumpFrom(0)">检查</el-button>
- <el-button link type="primary" size="default" :icon="View" @click="openDai(scope.row.targetDivideDetailList)">记录</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==null" @click="TypeDailog('发起审批','检查',scope.row.id,1)">发起审批</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==true" @click="TypeDailog('审批',scope.row.id,scope.row.approveId,1,scope.row)">审批</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==false" @click="TypeDailog('查看审批',scope.row.id,scope.row.approveId,1,scope.row)">查看审批</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==3" @click="openDai(scope.row.id,1)" >查看审批流程</el-button>
</template>
</el-table-column>
<el-table-column v-if="activeName == 2" label="操作" align="center" show-overflow-tooltip>
- <template #default>
- <el-button link type="primary" size="default" :icon="EditPen" @click="jumpFrom(1)">上报</el-button>
- </template>
- </el-table-column>
- <el-table-column v-if="activeName == 3" label="操作" align="center" show-overflow-tooltip>
- <template #default>
- <el-button link type="primary" size="default" :icon="EditPen" @click="jumpFrom">待审批</el-button>
+ <template #default="scope">
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==null" @click="TypeDailog('发起审批','检查',scope.row.id,2)">发起审批</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==true" @click="TypeDailog('审批',scope.row.id,scope.row.approveId,2,scope.row)">审批</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==2&&scope.row.checkApprove==false" @click="TypeDailog('查看审批',scope.row.id,scope.row.approveId,2,scope.row)">查看审批</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" v-if="scope.row.approveStatus==3" @click="openDai(scope.row.id,2)" >查看审批流程</el-button>
</template>
</el-table-column>
</el-table>
@@ -61,17 +60,19 @@
</div>
</div>
<Dailog ref="Show"></Dailog>
+ <TypeDailog ref="TypeD" @onType="typeAlign" />
</div>
</template>
<script lang="ts">
import Dailog from './component/Dailog.vue';
+import TypeDailog from './component/TypeDailog.vue';
import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue';
import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus';
import { Plus, Delete, Upload, Download, Refresh, View, EditPen } from '@element-plus/icons-vue';
import { useRouter } from 'vue-router';
import { goalManagementApi } from '/@/api/goalManagement';
export default defineComponent({
- components: { ElButton, ElInput, Dailog },
+ components: { ElButton, ElInput, Dailog,TypeDailog },
setup() {
// 搜索条件
const ruleForm = reactive({
@@ -80,8 +81,9 @@
searchParams: {
qName: '', ////安全目标指标
indexNum: '', ////目标指标编号
- targetType: '1', ////指标类型 1:年指标 2:月指标
- divideStatus: '', ////分解状态 1:已分解 2:未分解
+ targetType: 1, ////指标类型 1:年指标 2:月指标
+ divideStatus: 1, ////分解状态 1:已分解 2:未分解
+ relateType: 1, ////关联业务类型 1:目标检查 2:目标上报
},
});
// 重置
@@ -91,7 +93,7 @@
};
const listApi = () => {
goalManagementApi()
- .getTargetMngList(ruleForm)
+ .getworkApproveList(ruleForm)
.then((res) => {
if (res.data.code == 200) {
tableData.value = res.data.data;
@@ -106,7 +108,7 @@
//
const handleClick = (val: any) => {
// let targetType = JSON.parse(JSON.stringify(val));
- ruleForm.searchParams.targetType = val.paneName;
+ ruleForm.searchParams.relateType = val.paneName;
listApi();
};
onMounted(() => {
@@ -133,20 +135,21 @@
const activeName = ref<any>('1');
// 记录弹窗
const Show = ref();
- const openDai = (data: any) => {
- Show.value.openDailog(data);
+ const openDai = (data: any,num:number) => {
+ Show.value.openDailog(data,num);
};
- // 流程表单
- const router = useRouter();
- const jumpFrom = (data: any) => {
- router.push({
- path: '/processForms',
- query: {
- type: data,
- },
- });
+ // 发起审批弹窗
+ const TypeD = ref();
+ const TypeDailog = (title:string,name:string,id:number,type:number,data:any) => {
+ TypeD.value.openDialog(title,name,id,type,data);
};
+ const typeAlign=()=>{
+ listApi();
+ }
return {
+ TypeD,
+ typeAlign,
+ TypeDailog,
activeName,
total,
handleClick,
@@ -161,8 +164,6 @@
handleCurrentChange,
Show,
openDai,
- router,
- jumpFrom,
Plus,
Delete,
Upload,
@@ -195,4 +196,4 @@
display: flex;
justify-content: right;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.2