three-trees-ui 1.0.56 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/three-trees-ui.common.js +45380 -37732
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +45385 -37737
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/CustomComponent/src/main.vue +183 -64
- package/packages/Table/src/Table.vue +129 -3
- package/packages/TemplateForm/src/main.vue +72 -1
- package/src/mixins/querySqlPreview.js +137 -16
- package/src/mixins/templatePreview.js +28 -3
package/package.json
CHANGED
|
@@ -6,82 +6,201 @@
|
|
|
6
6
|
:ref="vueObj.alias"
|
|
7
7
|
:data="data"
|
|
8
8
|
:permission="permission"
|
|
9
|
-
:
|
|
9
|
+
:vue-obj="vueObj"
|
|
10
10
|
:component="component"
|
|
11
|
+
:index="index"
|
|
12
|
+
:item="item"
|
|
11
13
|
></component>
|
|
12
14
|
</template>
|
|
13
15
|
</div>
|
|
14
16
|
</template>
|
|
15
17
|
|
|
16
18
|
<script>
|
|
17
|
-
import Vue from 'vue'
|
|
19
|
+
import Vue from 'vue'
|
|
20
|
+
const { Base64 } = require('js-base64')
|
|
18
21
|
|
|
19
|
-
export default {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
export default {
|
|
23
|
+
name: 'HtCustomComponent',
|
|
24
|
+
componentName: 'HtCustomComponent',
|
|
25
|
+
props: {
|
|
26
|
+
data: Object,
|
|
27
|
+
permission: Object,
|
|
28
|
+
ccAlias: String,
|
|
29
|
+
item: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => {
|
|
32
|
+
return {}
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
index: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: null,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
loadOver: false,
|
|
43
|
+
vueObj: {},
|
|
44
|
+
component: {},
|
|
45
|
+
componentName: '',
|
|
41
46
|
}
|
|
47
|
+
},
|
|
48
|
+
mounted() {
|
|
49
|
+
// this.init();
|
|
50
|
+
},
|
|
51
|
+
created() {
|
|
52
|
+
//根据自定义组件id查询组件对象
|
|
53
|
+
// this.$http
|
|
54
|
+
// .get('${form}/formCustomComponent/v1/getByAlias?alias=' + this.ccAlias)
|
|
55
|
+
// .then((resp) => {
|
|
56
|
+
// this.vueObj = resp.data
|
|
57
|
+
// this.init()
|
|
58
|
+
// })
|
|
42
59
|
|
|
43
|
-
this
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
this.$requestConfig
|
|
61
|
+
.getFormCustomComponentByAlias(this.ccAlias)
|
|
62
|
+
.then((resp) => {
|
|
63
|
+
this.vueObj = resp
|
|
64
|
+
this.init()
|
|
65
|
+
})
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
async init() {
|
|
69
|
+
//解析jscode;
|
|
70
|
+
this.component = {}
|
|
71
|
+
|
|
72
|
+
if (this.vueObj.jsCode) {
|
|
73
|
+
let jsCode = Base64.decode(this.vueObj.jsCode, 'utf-8')
|
|
74
|
+
let parseJsCode = function() {
|
|
75
|
+
return eval('(function(){return {' + jsCode + '} })()')
|
|
76
|
+
}
|
|
77
|
+
this.component = parseJsCode()
|
|
53
78
|
}
|
|
54
|
-
|
|
55
|
-
this.component.
|
|
56
|
-
|
|
79
|
+
|
|
80
|
+
this.component.props = [
|
|
81
|
+
'data',
|
|
82
|
+
'permission',
|
|
83
|
+
'vueObj',
|
|
84
|
+
'component',
|
|
85
|
+
'index',
|
|
86
|
+
'item',
|
|
87
|
+
]
|
|
88
|
+
if (this.vueObj.template) {
|
|
89
|
+
this.component.template = Base64.decode(this.vueObj.template, 'utf-8')
|
|
90
|
+
} else {
|
|
91
|
+
this.component.template = '<div></div>'
|
|
57
92
|
}
|
|
58
|
-
}
|
|
59
93
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
94
|
+
// 支持引用 工具类 js
|
|
95
|
+
const utilJsObj = {}
|
|
96
|
+
if (this.vueObj.utilJs) {
|
|
97
|
+
try {
|
|
98
|
+
const utilJsList = JSON.parse(
|
|
99
|
+
Base64.decode(this.vueObj.utilJs, 'utf-8')
|
|
100
|
+
)
|
|
101
|
+
for (const item of utilJsList) {
|
|
102
|
+
const name = item.utilJs_name
|
|
103
|
+
const path = item.utilJs_path.replace('@/', '')
|
|
104
|
+
if (name && path) {
|
|
105
|
+
// require 跟 import 都不能直接使用变量
|
|
106
|
+
const utilJs = await require('../../' + path)
|
|
107
|
+
utilJsObj[name] = utilJs.default
|
|
108
|
+
}
|
|
109
|
+
if ((name && !path) || (!name && path)) {
|
|
110
|
+
this.$message.error(
|
|
111
|
+
'utilJs_name or utilJs_path cannot be empty!'
|
|
112
|
+
)
|
|
113
|
+
throw new Error('utilJs_name or utilJs_path cannot be empty!')
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
} catch (error) {
|
|
117
|
+
console.log(error, 'error')
|
|
118
|
+
}
|
|
119
|
+
}
|
|
78
120
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
121
|
+
if (this.vueObj.dataCode) {
|
|
122
|
+
let dataCodeStr = Base64.decode(this.vueObj.dataCode)
|
|
123
|
+
let parseDataCode = function() {
|
|
124
|
+
return eval('(function(){return ' + dataCodeStr + ' })()')
|
|
125
|
+
}
|
|
126
|
+
let data = parseDataCode()
|
|
127
|
+
this.component.data = function() {
|
|
128
|
+
return data
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// 支持引用外部组件
|
|
133
|
+
if (this.vueObj.components) {
|
|
134
|
+
try {
|
|
135
|
+
const components = JSON.parse(
|
|
136
|
+
Base64.decode(this.vueObj.components, 'utf-8')
|
|
137
|
+
)
|
|
138
|
+
for (const item of components) {
|
|
139
|
+
const name = item.components_name
|
|
140
|
+
const path = item.components_path.replace('@/', '')
|
|
141
|
+
if (name && path) {
|
|
142
|
+
// require 跟 import 都不能直接使用变量
|
|
143
|
+
const component = await require('../../' + path)
|
|
144
|
+
this.component.components[item.components_name] =
|
|
145
|
+
component.default
|
|
146
|
+
}
|
|
147
|
+
if ((name && !path) || (!name && path)) {
|
|
148
|
+
this.$message.error(
|
|
149
|
+
'component_name or component_path cannot be empty!'
|
|
150
|
+
)
|
|
151
|
+
throw new Error(
|
|
152
|
+
'component_name or component_path cannot be empty!'
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
} catch (error) {
|
|
157
|
+
console.log(error, 'error')
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 支持引用外部js混入
|
|
162
|
+
if (this.vueObj.mixins) {
|
|
163
|
+
this.component.mixins = []
|
|
164
|
+
try {
|
|
165
|
+
const mixins = JSON.parse(
|
|
166
|
+
Base64.decode(this.vueObj.mixins, 'utf-8')
|
|
167
|
+
)
|
|
168
|
+
for (const item of mixins) {
|
|
169
|
+
const name = item.mixin_name
|
|
170
|
+
const path = item.mixin_path.replace('@/', '')
|
|
171
|
+
|
|
172
|
+
if (name && path) {
|
|
173
|
+
// require 跟 import 都不能直接使用变量
|
|
174
|
+
const mixin = await require('../../' + path)
|
|
175
|
+
this.component.mixins.push(mixin.default)
|
|
176
|
+
}
|
|
177
|
+
if ((name && !path) || (!name && path)) {
|
|
178
|
+
this.$message.error(
|
|
179
|
+
'mixin_name or mixin_path cannot be empty!'
|
|
180
|
+
)
|
|
181
|
+
throw new Error('mixin_name or mixin_path cannot be empty!')
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
} catch (error) {
|
|
185
|
+
console.log(error, 'error')
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//支持引入css样式
|
|
190
|
+
if (this.vueObj.cssCode) {
|
|
191
|
+
let cssCode = Base64.decode(this.vueObj.cssCode, 'utf-8')
|
|
192
|
+
let stylee = document.createElement('style')
|
|
193
|
+
stylee.type = 'text/css'
|
|
194
|
+
stylee.innerHTML = cssCode
|
|
195
|
+
document.head.appendChild(stylee)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
this.componentName = this.ccAlias + '-component'
|
|
199
|
+
//加载动态组件
|
|
200
|
+
Vue.component(this.componentName, this.component)
|
|
201
|
+
//加载完成后显示
|
|
202
|
+
this.loadOver = true
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
}
|
|
87
206
|
</script>
|
|
@@ -112,8 +112,10 @@
|
|
|
112
112
|
:highlight-current-row="highlightCurrentRow"
|
|
113
113
|
:row-class-name="rowClassName"
|
|
114
114
|
:cell-class-name="cellClassName"
|
|
115
|
-
:
|
|
115
|
+
:height="`${tableMaxHeight ? tableMaxHeight : 400}`"
|
|
116
116
|
:row-key="rowKey"
|
|
117
|
+
:show-summary="showSummary"
|
|
118
|
+
:summary-method="getSummaries"
|
|
117
119
|
@row-click="handleRowClick"
|
|
118
120
|
@select="handleTableSelect"
|
|
119
121
|
@select-all="handleTableSelect"
|
|
@@ -190,6 +192,10 @@
|
|
|
190
192
|
</el-main>
|
|
191
193
|
</template>
|
|
192
194
|
<script>
|
|
195
|
+
const METHOD_MAP = {
|
|
196
|
+
count: 'getCount',
|
|
197
|
+
sum: 'getSum',
|
|
198
|
+
}
|
|
193
199
|
import Locale from '@/mixins/locale'
|
|
194
200
|
import Emitter from '@/mixins/emitter'
|
|
195
201
|
import utils from '@/utils.js'
|
|
@@ -367,6 +373,18 @@
|
|
|
367
373
|
type: String,
|
|
368
374
|
default: 'total, sizes, prev, pager, next, jumper',
|
|
369
375
|
},
|
|
376
|
+
tableMainName: {
|
|
377
|
+
type: String,
|
|
378
|
+
default: '',
|
|
379
|
+
},
|
|
380
|
+
tableDataFields: {
|
|
381
|
+
type: Array,
|
|
382
|
+
default: () => [],
|
|
383
|
+
},
|
|
384
|
+
tableDataTotal: {
|
|
385
|
+
type: Object,
|
|
386
|
+
default: () => {},
|
|
387
|
+
},
|
|
370
388
|
},
|
|
371
389
|
data() {
|
|
372
390
|
return {
|
|
@@ -388,6 +406,7 @@
|
|
|
388
406
|
selection: [],
|
|
389
407
|
tablePanelHeight: 0,
|
|
390
408
|
isCardView: this.cardView,
|
|
409
|
+
showSummary: false,
|
|
391
410
|
}
|
|
392
411
|
},
|
|
393
412
|
computed: {
|
|
@@ -447,6 +466,13 @@
|
|
|
447
466
|
customTableHeight() {
|
|
448
467
|
this.calcTableHeight()
|
|
449
468
|
},
|
|
469
|
+
tableDataFields: {
|
|
470
|
+
immediate: true,
|
|
471
|
+
handler: function(val) {
|
|
472
|
+
// 只要显示列有一个属性设置了合计,则开启表格合计功能
|
|
473
|
+
this.showSummary = val.some((i) => i.summaryMethod)
|
|
474
|
+
},
|
|
475
|
+
},
|
|
450
476
|
},
|
|
451
477
|
created() {
|
|
452
478
|
this.initCustomColumns()
|
|
@@ -692,8 +718,19 @@
|
|
|
692
718
|
me.$refs.quickSearch.$children[0].$el.children[0].focus()
|
|
693
719
|
})
|
|
694
720
|
}
|
|
695
|
-
|
|
696
|
-
|
|
721
|
+
// 是否需要后端统计
|
|
722
|
+
// 只要 表格列设置中,存在 合计方式为求和 且 合计范围不为 单页合计,即需要请求
|
|
723
|
+
const needRequestTotal = this.tableDataFields.some(
|
|
724
|
+
(field) =>
|
|
725
|
+
field.summaryMethod === 'sum' && field.summaryType !== 'single'
|
|
726
|
+
)
|
|
727
|
+
this.$emit(
|
|
728
|
+
'load',
|
|
729
|
+
{ ...param },
|
|
730
|
+
loadedHandler,
|
|
731
|
+
isSearchBtn,
|
|
732
|
+
needRequestTotal
|
|
733
|
+
)
|
|
697
734
|
this.$emit('loading', { ...param }, loadedHandler, isSearchBtn)
|
|
698
735
|
},
|
|
699
736
|
// 通过列属性获取列标签
|
|
@@ -906,6 +943,95 @@
|
|
|
906
943
|
)
|
|
907
944
|
})
|
|
908
945
|
},
|
|
946
|
+
getSummaries(param) {
|
|
947
|
+
const { columns, data } = param
|
|
948
|
+
const sums = []
|
|
949
|
+
columns.forEach((column, index) => {
|
|
950
|
+
if (index === 0) {
|
|
951
|
+
sums[index] = '合计'
|
|
952
|
+
return
|
|
953
|
+
}
|
|
954
|
+
if (column.property) {
|
|
955
|
+
const tableFieldItem = this.getTableFieldItem(column.property)
|
|
956
|
+
if (tableFieldItem) {
|
|
957
|
+
const {
|
|
958
|
+
summaryMethod,
|
|
959
|
+
summaryType,
|
|
960
|
+
name,
|
|
961
|
+
tableName,
|
|
962
|
+
oldTableField,
|
|
963
|
+
fieldDesc,
|
|
964
|
+
} = tableFieldItem
|
|
965
|
+
if (!summaryMethod) {
|
|
966
|
+
sums[index] = ''
|
|
967
|
+
return
|
|
968
|
+
}
|
|
969
|
+
let field = ''
|
|
970
|
+
if (oldTableField) {
|
|
971
|
+
// 数据列表
|
|
972
|
+
field = this.getPropTable(
|
|
973
|
+
name,
|
|
974
|
+
tableName,
|
|
975
|
+
oldTableField
|
|
976
|
+
).toLowerCase()
|
|
977
|
+
} else {
|
|
978
|
+
// 数据视图
|
|
979
|
+
field = fieldDesc.toLowerCase()
|
|
980
|
+
}
|
|
981
|
+
switch (summaryType) {
|
|
982
|
+
// 单页统计
|
|
983
|
+
case 'single':
|
|
984
|
+
// 前端合计当前页
|
|
985
|
+
sums[index] = this[METHOD_MAP[summaryMethod]](data, name)
|
|
986
|
+
break
|
|
987
|
+
default:
|
|
988
|
+
if (summaryMethod === 'sum') {
|
|
989
|
+
// 后端合计全部页
|
|
990
|
+
sums[index] = this.tableDataTotal[field]
|
|
991
|
+
} else if (summaryMethod === 'count') {
|
|
992
|
+
// 计数 计算当前列不为空的个数
|
|
993
|
+
sums[index] = this[METHOD_MAP[summaryMethod]](data, name)
|
|
994
|
+
}
|
|
995
|
+
break
|
|
996
|
+
}
|
|
997
|
+
} else {
|
|
998
|
+
sums[index] = ''
|
|
999
|
+
}
|
|
1000
|
+
} else {
|
|
1001
|
+
sums[index] = ''
|
|
1002
|
+
}
|
|
1003
|
+
})
|
|
1004
|
+
|
|
1005
|
+
return sums
|
|
1006
|
+
},
|
|
1007
|
+
getTableFieldItem(property) {
|
|
1008
|
+
return this.tableDataFields.find((i) => {
|
|
1009
|
+
let field = ''
|
|
1010
|
+
if (i.oldTableField) {
|
|
1011
|
+
// 表单列表
|
|
1012
|
+
field = this.getPropTable(i.name, i.tableName, i.oldTableField)
|
|
1013
|
+
return field === property
|
|
1014
|
+
} else {
|
|
1015
|
+
// 数据视图
|
|
1016
|
+
return i.fieldDesc.toLowerCase() === property.toLowerCase()
|
|
1017
|
+
}
|
|
1018
|
+
})
|
|
1019
|
+
},
|
|
1020
|
+
getCount(data, field) {
|
|
1021
|
+
const hasValueList = data.filter((i) => i[field])
|
|
1022
|
+
return hasValueList.length
|
|
1023
|
+
},
|
|
1024
|
+
getSum(data, field) {
|
|
1025
|
+
const sumResult = data.reduce((pre, cur) => pre + Number(cur[field]), 0)
|
|
1026
|
+
return sumResult ? utils.thousandBit(sumResult) : sumResult
|
|
1027
|
+
},
|
|
1028
|
+
getPropTable(field, tableName, oldTableField) {
|
|
1029
|
+
if (this.tableMainName.toLowerCase() == tableName.toLowerCase()) {
|
|
1030
|
+
return `t.${oldTableField}`
|
|
1031
|
+
} else {
|
|
1032
|
+
return `${tableName}.${oldTableField}`
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
909
1035
|
},
|
|
910
1036
|
}
|
|
911
1037
|
</script>
|
|
@@ -33,10 +33,43 @@
|
|
|
33
33
|
v-if="isShow && action != 'editDraft'"
|
|
34
34
|
type="primary"
|
|
35
35
|
:disabled="disabled"
|
|
36
|
-
@click="
|
|
36
|
+
@click="SetOpinionText()"
|
|
37
37
|
>
|
|
38
38
|
提交
|
|
39
39
|
</el-button>
|
|
40
|
+
<!-- 是否需要保存意见对话框 --start -->
|
|
41
|
+
<el-dialog
|
|
42
|
+
id="needOpinionDialog"
|
|
43
|
+
title="请填写修改理由:"
|
|
44
|
+
:visible.sync="needOpinionDialog"
|
|
45
|
+
width="30%"
|
|
46
|
+
:before-close="closeOpinionDialog"
|
|
47
|
+
>
|
|
48
|
+
<el-container>
|
|
49
|
+
<el-main style="padding:0px;height:80px">
|
|
50
|
+
<ht-input
|
|
51
|
+
v-model="needOpinionDetail"
|
|
52
|
+
type="textarea"
|
|
53
|
+
name="修改理由"
|
|
54
|
+
:validate="{ required: true }"
|
|
55
|
+
style="width:100%"
|
|
56
|
+
></ht-input>
|
|
57
|
+
</el-main>
|
|
58
|
+
</el-container>
|
|
59
|
+
<div slot="footer" class="dialog-footer">
|
|
60
|
+
<el-button
|
|
61
|
+
:disabled="needOpinionDetail === '' ? true : false"
|
|
62
|
+
type="primary"
|
|
63
|
+
@click="boSave()"
|
|
64
|
+
>
|
|
65
|
+
提交
|
|
66
|
+
</el-button>
|
|
67
|
+
<el-button type="default" @click="closeOpinionDialog()">
|
|
68
|
+
取消
|
|
69
|
+
</el-button>
|
|
70
|
+
</div>
|
|
71
|
+
</el-dialog>
|
|
72
|
+
<!-- 是否需要保留意见对话框 --end -->
|
|
40
73
|
<!-- <el-button
|
|
41
74
|
v-if="action === 'editDraft'"
|
|
42
75
|
type="primary"
|
|
@@ -107,6 +140,10 @@
|
|
|
107
140
|
type: Boolean,
|
|
108
141
|
default: false,
|
|
109
142
|
},
|
|
143
|
+
//是否需要保存意见
|
|
144
|
+
needOpinion: {
|
|
145
|
+
type: String,
|
|
146
|
+
},
|
|
110
147
|
},
|
|
111
148
|
data() {
|
|
112
149
|
return {
|
|
@@ -131,6 +168,8 @@
|
|
|
131
168
|
tempAlias: '',
|
|
132
169
|
startLable: '发起流程',
|
|
133
170
|
printLable: '打印',
|
|
171
|
+
needOpinionDialog: false,
|
|
172
|
+
needOpinionDetail: '',
|
|
134
173
|
}
|
|
135
174
|
},
|
|
136
175
|
computed: {
|
|
@@ -244,6 +283,15 @@
|
|
|
244
283
|
boAlias: this.boAlias,
|
|
245
284
|
boData: formData,
|
|
246
285
|
}
|
|
286
|
+
//把修改原因也设置到boData里面
|
|
287
|
+
if (
|
|
288
|
+
this.action === 'edit' &&
|
|
289
|
+
((this.needOpinion && this.needOpinion === '1') ||
|
|
290
|
+
(this.$route.query.needOpinion &&
|
|
291
|
+
this.$route.query.needOpinion === '1'))
|
|
292
|
+
) {
|
|
293
|
+
data.boData.needOpinionDetail = this.needOpinionDetail
|
|
294
|
+
}
|
|
247
295
|
this.disabled = true
|
|
248
296
|
|
|
249
297
|
if (delDraftId) {
|
|
@@ -255,6 +303,8 @@
|
|
|
255
303
|
.boSave(data)
|
|
256
304
|
.then((result) => {
|
|
257
305
|
if (result.state) {
|
|
306
|
+
//保存成功时清空意见框
|
|
307
|
+
this.needOpinionDetail = ''
|
|
258
308
|
if (this.closeSave) {
|
|
259
309
|
this.close()
|
|
260
310
|
return
|
|
@@ -292,6 +342,27 @@
|
|
|
292
342
|
})
|
|
293
343
|
.catch(() => {})
|
|
294
344
|
},
|
|
345
|
+
SetOpinionText() {
|
|
346
|
+
console.log(
|
|
347
|
+
this.action,
|
|
348
|
+
this.needOpinion,
|
|
349
|
+
this.$route.query.needOpinion
|
|
350
|
+
)
|
|
351
|
+
if (
|
|
352
|
+
this.action === 'edit' &&
|
|
353
|
+
((this.needOpinion && this.needOpinion === '1') ||
|
|
354
|
+
(this.$route.query.needOpinion &&
|
|
355
|
+
this.$route.query.needOpinion === '1'))
|
|
356
|
+
) {
|
|
357
|
+
//只有编辑的时候需要填写意见框
|
|
358
|
+
this.needOpinionDialog = true
|
|
359
|
+
} else {
|
|
360
|
+
this.boSave()
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
closeOpinionDialog() {
|
|
364
|
+
this.needOpinionDialog = false
|
|
365
|
+
},
|
|
295
366
|
boSaveAndDelDraft() {
|
|
296
367
|
this.boSave(this.draftId)
|
|
297
368
|
},
|