From dbeff3bbf8d59b41c301f2ea723ff4171445ef2d Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期一, 25 十二月 2023 17:23:53 +0800
Subject: [PATCH] modified: src/views/common/qrCodeApp.vue
---
src/views/technology/document/index.vue | 140 +++++++++++++++++++---------------------------
1 files changed, 59 insertions(+), 81 deletions(-)
diff --git a/src/views/technology/document/index.vue b/src/views/technology/document/index.vue
index 5404930..d107579 100644
--- a/src/views/technology/document/index.vue
+++ b/src/views/technology/document/index.vue
@@ -14,6 +14,20 @@
<!-- <el-button type="primary" :loading="ifsSynsLoading" @click="syncIfs"
>ERP鍚屾</el-button
> -->
+ <el-button v-if="permissions.technology_document_add"
+ type="primary" @click="addOrUpdateHandle">鏂板</el-button>
+
+ <el-button @click="() => {this.changeState('accept')}"
+ :disabled="uniqueStateArr.includes(['01draft', '03accepted', '04reject'])"
+ v-if="permissions.technology_document_accept">鎵瑰噯</el-button>
+
+ <el-button @click="() => {this.changeState('reject')}"
+ :disabled="uniqueStateArr.includes(['01draft', '03accepted', '04reject'])"
+ v-if="permissions.technology_document_reject">鎷掔粷</el-button>
+
+ <el-button @click="() => {this.changeState('cancel')}"
+ :disabled="uniqueStateArr.includes(['01draft', '03accepted', '04reject'])"
+ v-if="permissions.technology_document_cancel">鎾ら攢</el-button>
<el-button
type="primary"
@click="deleteBatch"
@@ -88,6 +102,7 @@
data() {
return {
ids: [],
+ uniqueStateArr: [],
ajaxFun: fetchList,
multipleSelection: [],
isShowQuery: false,
@@ -142,25 +157,25 @@
searchInfoType: 'text'
},
// 缁濈紭棰滆壊
- {
- minWidth: '120',
- prop: 'insulationColor',
- label: '缁濈紭棰滆壊',
- sort: true,
- isTrue: true,
- isSearch: true,
- searchInfoType: 'text'
- },
+ // {
+ // minWidth: '120',
+ // prop: 'insulationColor',
+ // label: '缁濈紭棰滆壊',
+ // sort: true,
+ // isTrue: true,
+ // isSearch: true,
+ // searchInfoType: 'text'
+ // },
// 鎶ゅ棰滆壊
- {
- minWidth: '120',
- prop: 'sheathColor',
- label: '鎶ゅ棰滆壊',
- sort: true,
- isTrue: true,
- isSearch: true,
- searchInfoType: 'text'
- },
+ // {
+ // minWidth: '120',
+ // prop: 'sheathColor',
+ // label: '鎶ゅ棰滆壊',
+ // sort: true,
+ // isTrue: true,
+ // isSearch: true,
+ // searchInfoType: 'text'
+ // },
{
minWidth: '120',
prop: 'testStandard',
@@ -239,7 +254,7 @@
isSearch: true,
searchInfoType: 'text'
},
- {
+ /* {
minWidth: '120',
prop: 'projectType',
label: '椤圭洰绫诲埆',
@@ -271,7 +286,7 @@
isSearch: true,
searchInfoType: 'text'
},
-
+ */
// 鎻忚堪
{
minWidth: '120',
@@ -323,43 +338,12 @@
}
],
toolbar: [
- {
- text: '鏂板',
- type: 'primary',
- fun: this.addOrUpdateHandle,
- disabled: false,
- permitArr: []
- },
// {
// text: '澶嶅埗',
// fun: this.copyDocument,
// disabled: false,
// permitArr: []
// },
- {
- text: '鎵瑰噯',
- fun: () => {
- this.changeState('accept')
- },
- disabled: false,
- permitArr: ['01draft', '03accepted', '04reject']
- },
- {
- text: '鎷掔粷',
- fun: () => {
- this.changeState('reject')
- },
- disabled: false,
- permitArr: ['01draft', '03accepted', '04reject']
- },
- {
- text: '鎾ら攢',
- fun: () => {
- this.changeState('cancel')
- },
- disabled: false,
- permitArr: ['01draft', '03accepted', '04reject']
- }
/*,
{
text: '娴风紗OA',
@@ -387,7 +371,7 @@
permitArr: []
} */
],
- operator: [],
+ operator: null,
operatorConfig: {
fixed: 'right',
label: '鎿嶄綔',
@@ -458,9 +442,8 @@
this.getData()
},
created() {
- this.getBomTypeDbOptions()
if (this.permissions.technology_document_del) {
- this.table.operator.push({
+ this.table.operator = [{
text: '鍒犻櫎',
type: 'text',
size: 'small',
@@ -469,19 +452,9 @@
val: ['01draft'],
key: 'state'
}
- })
- } else {
- this.table.operator.push({
- text: '鍒犻櫎',
- type: 'text',
- size: 'small',
- fun: this.deleteHandle,
- show: {
- val: [],
- key: 'state'
- }
- })
- }
+ }]
+ }
+ this.getBomTypeDbOptions()
},
methods: {
getBomTypeDbOptions() {
@@ -523,6 +496,10 @@
},
// 鏂板 / 淇敼
addOrUpdateHandle(row) {
+ if(!this.permissions.technology_document_edit && row.id!=null){
+ this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+ return
+ }
this.$router.push({
name: 'documentForm',
query: { id: row == null ? null : row.id }
@@ -585,21 +562,22 @@
uniqueStateArr.push(stateArr[i])
}
}
+ this.uniqueStateArr = uniqueStateArr
// 寰幆琛ㄥご鎸夐挳锛屽垽鏂瘡涓寜閽殑permitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆
- var toolbar = this.table.toolbar
- for (var j = 0; j < toolbar.length; j++) {
- if (
- uniqueStateArr.every((val) =>
- toolbar[j].permitArr.length <= 0
- ? true
- : toolbar[j].permitArr.includes(val)
- )
- ) {
- toolbar[j].disabled = false
- } else {
- toolbar[j].disabled = true
- }
- }
+ // var toolbar = this.table.toolbar
+ // for (var j = 0; j < toolbar.length; j++) {
+ // if (
+ // uniqueStateArr.every((val) =>
+ // toolbar[j].permitArr.length <= 0
+ // ? true
+ // : toolbar[j].permitArr.includes(val)
+ // )
+ // ) {
+ // toolbar[j].disabled = false
+ // } else {
+ // toolbar[j].disabled = true
+ // }
+ // }
// 灏嗛�変腑璁板綍璧嬪�肩粰multipleSelection
this.multipleSelection = val
},
--
Gitblit v1.9.3