From 393610e32b27220268489feb4633a0907dd6bbc2 Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期三, 15 一月 2025 10:54:06 +0800
Subject: [PATCH] 修改流程模板定义
---
Source/plt-web/plt-web-ui/src/api/processTemplate/define.js | 21 ++++++++++
Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue | 93 +++++++++++++++++++++++++++++++---------------
Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue | 1
3 files changed, 85 insertions(+), 30 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/api/processTemplate/define.js b/Source/plt-web/plt-web-ui/src/api/processTemplate/define.js
index 63ce914..4945e45 100644
--- a/Source/plt-web/plt-web-ui/src/api/processTemplate/define.js
+++ b/Source/plt-web/plt-web-ui/src/api/processTemplate/define.js
@@ -29,3 +29,24 @@
params
})
}
+// 瀵煎嚭
+export function download (params) {
+ return request({
+ url: '/api/webEnumController/exportEnumTypes',
+ method: 'get',
+ headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
+ responseType: 'blob',
+ params
+ })
+}
+
+// 涓嬭浇瀵煎叆妯℃澘
+export function downloadTemplate (params) {
+ return request({
+ url: '/api/webEnumController/downloadEnumTemplate',
+ method: 'get',
+ headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
+ responseType: 'blob',
+ params
+ })
+}
diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
index 8d31a39..b8a8c09 100644
--- a/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
@@ -9,49 +9,34 @@
<el-option
v-for="item in tempTypeData"
:key="item.oid"
- :label="item.text"
- :value="item.attributes.name">
+ :label="item.name"
+ :value="item.oid">
</el-option>
</el-select>
娴佺▼妯℃澘鍚嶇О锛�
<el-input size="small" v-model="tempName" style="width: 300px;margin-right: 10px;"></el-input>
<el-button icon="el-icon-search" plain size="small" style="margin-right: 40px;" type="primary"
- @click="searchValue">
+ @click="searchData">
鏌ヨ
</el-button>
</div>
<div>
<el-main>
- <basic-container>
<avue-crud
ref="userCrud"
:data="tableData"
:option="option"
:table-loading="tableLoading"
@on-load="getTableList"
- @refresh-change="handleRefresh"
- @search-change="handleSearch"
- @search-reset="handleReset"
- @selection-change="selectChange"
+ @refresh-change="getTableList"
+ @selection-change="selectionChange"
@row-click="rowClickHandler"
>
-
<template slot="menuLeft" slot-scope="scope">
<el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary"
- @click="rowSaveHandlerClick">
+ @click="addHandler">
<icon-show :name="permissionList.addBtn.source"></icon-show>
- 鍒涘缓
- </el-button>
- <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger"
- @click="allDelHandler">
- <icon-show :name="permissionList.delBtn.source"></icon-show>
- 鍒犻櫎
- </el-button>
- <el-button v-if="permissionList.viewTheScopeBtn" class="button-custom-icon" plain size="small"
- type="primary"
- @click="chekView">
- <icon-show :name="permissionList.viewTheScopeBtn.source"></icon-show>
- 鏌ョ湅浣跨敤鑼冨洿
+ 澧炲姞
</el-button>
<el-button v-if="permissionList.downloadImportTemplateBtn" class="button-custom-icon" plain size="small"
type="primary" @click="downloadTemplateHandler">
@@ -59,7 +44,7 @@
涓嬭浇瀵煎叆妯℃澘
</el-button>
<el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary"
- @click="uploadUser">
+ @click="uploadHandler">
<icon-show :name="permissionList.importBtn.source"></icon-show>
瀵煎叆
</el-button>
@@ -81,6 +66,16 @@
<icon-show :name="permissionList.delBtn.source"></icon-show>
鍒犻櫎
</el-button>
+ <el-button size="small" type="text" @click.stop="stopUserHandler(scope.row)">
+ <span v-if="scope.row.status === 0 && permissionList.stopBtn" style="color: #fa3434;display: flex">
+ <icon-show :name="permissionList.stopBtn.source"></icon-show>
+ 鍋滅敤
+ </span>
+ <span v-if="scope.row.status === 1 && permissionList.actionBtn" style="color: #55b61d;display: flex">
+ <icon-show :name="permissionList.actionBtn.source"></icon-show>
+ 鍚敤
+ </span>
+ </el-button>
</template>
</avue-crud>
@@ -100,13 +95,10 @@
<el-button size="small" @click="dialogVisible = false">鍙� 娑�</el-button>
</span>
</el-dialog>
-
- </basic-container>
</el-main>
<el-aside width="35%">
- <basic-container>
- </basic-container>
+ <div></div>
</el-aside>
</div>
</basic-container>
@@ -115,8 +107,8 @@
<script>
import {mapGetters} from "vuex";
import basicOption from "@/util/basic-option";
-import {deleteType, getTypeList, saveType, updateType} from "@/api/processTemplate/type";
-import {getProcessTempList,saveProcessTemp,updateProcessTemp,deleteProcessTemp} from "@/api/processTemplate/define";
+import {getTypeList} from "@/api/processTemplate/type";
+import {getProcessTempList,saveProcessTemp,updateProcessTemp,deleteProcessTemp,downloadTemplate,download} from "@/api/processTemplate/define";
import func from "@/util/func";
export default {
@@ -147,6 +139,11 @@
addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
+ exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
+ importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
+ downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].DOWNLOADFILE, false),
+ stopBtn: this.vaildData(this.permission[this.$route.query.id].FREEZE, false),
+ actionBtn: this.vaildData(this.permission[this.$route.query.id].UNFREZE, false),
};
},
option(){
@@ -175,16 +172,24 @@
}
}
},
+ created() {
+ getTypeList().then(res => {
+ this.tempTypeData = res.data.data;
+ })
+ },
methods:{
getTableList(){
this.tableLoading = true;
- getProcessTempList().then(res => {
+ getProcessTempList({tempType:this.tempType,tempName:this.tempName}).then(res => {
this.tableData = res.data.data;
this.tableLoading = false;
})
},
//娴佺▼鍒嗙被閫夋嫨
tempTypeChange(val){
+ this.getTableList();
+ },
+ searchData(){
this.getTableList();
},
// 鏂板
@@ -261,6 +266,34 @@
}
);
},
+
+ // 瀵煎嚭
+ downloadHandler() {
+ if (this.selectionList.length <= 0) {
+ this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹繘琛屽鍑�');
+ return;
+ }
+
+ download({enumNames: this.ids}).then(res => {
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('瀵煎嚭鎴愬姛');
+ }).catch(err => {
+ })
+ },
+
+ // 涓嬭浇瀵煎叆妯℃澘
+ downloadTemplateHandler() {
+ downloadTemplate().then(res => {
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('涓嬭浇鎴愬姛');
+ }).catch(err => {
+ })
+ },
+
+ //瀵煎叆
+ uploadHandler() {
+ this.$refs.upload.visible = true;
+ }
}
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
index dabb067..8c4b080 100644
--- a/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
@@ -8,6 +8,7 @@
:option="option"
:table-loading="tableLoading"
@on-load="getTableList"
+ @refresh-change="getTableList"
@row-save="rowSaveHandler"
@row-update="rowUpdateHandler"
@row-click="rowClickHandler"
--
Gitblit v1.9.3