cloud-web-corejs 1.0.27 → 1.0.28
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/package.json +1 -1
- package/src/components/jsonImport/exportDialog.vue +1 -1
- package/src/components/jsonImport/index.vue +151 -202
- package/src/components/jsonImport/mixins.js +1 -309
- package/src/layout/components/Sidebar/default.vue +1 -2
- package/src/store/config/index.js +3 -0
- package/src/store/modules/permission.js +2 -2
- package/src/views/bd/setting/form_script/list.vue +223 -223
- package/src/views/bd/setting/form_script/list1.vue +444 -444
- package/src/views/bd/setting/form_template/list.vue +766 -766
- package/src/views/bd/setting/menu_kind/list.vue +266 -262
- package/src/views/bd/setting/table_model/list.vue +491 -491
- package/src/views/user/home/index.vue +2 -1
|
@@ -1,223 +1,223 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="containt">
|
|
3
|
-
<x-tabs ref="xTabs" v-model="activeName" class="tab-box">
|
|
4
|
-
<el-tab-pane :label="$t1('常规')" name="first">
|
|
5
|
-
<editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
|
|
6
|
-
@reload="$reloadHandle" :formCode="formCode" :scriptType="scriptType"></editView>
|
|
7
|
-
</el-tab-pane>
|
|
8
|
-
<el-tab-pane :label="$t1('列表')" name="second">
|
|
9
|
-
<div class="grid-height">
|
|
10
|
-
<vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
11
|
-
@custom="$vxeTableUtil.customHandle">
|
|
12
|
-
<template #form>
|
|
13
|
-
<tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
|
|
14
|
-
<template #buttonLeft>
|
|
15
|
-
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog"
|
|
16
|
-
v-if="isDev">新增
|
|
17
|
-
</vxe-button>
|
|
18
|
-
<vxe-button status="success" class="button-sty" icon="el-icon-download" @click="jsonImport">导入发布
|
|
19
|
-
</vxe-button>
|
|
20
|
-
<vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport"
|
|
21
|
-
v-if="isDev">导出发布
|
|
22
|
-
</vxe-button>
|
|
23
|
-
</template>
|
|
24
|
-
<template #buttonRight>
|
|
25
|
-
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
26
|
-
plain>{{$t1('重置')}}
|
|
27
|
-
</vxe-button>
|
|
28
|
-
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
|
|
29
|
-
</vxe-button>
|
|
30
|
-
</template>
|
|
31
|
-
</tableForm>
|
|
32
|
-
</template>
|
|
33
|
-
</vxe-grid>
|
|
34
|
-
</div>
|
|
35
|
-
</el-tab-pane>
|
|
36
|
-
<template #editTab="{tab,index,reloadTabContent}">
|
|
37
|
-
<el-tab-pane :key="tab.data.id" :label.sync="tab.data.scriptName" :name="tab.data.id+''"
|
|
38
|
-
:closable="true">
|
|
39
|
-
<editView v-if="tab.showContent" :_dataId="tab.dataId" :formCode="formCode" :scriptType="scriptType"
|
|
40
|
-
:parent-target="_self"
|
|
41
|
-
@reload="reloadTabContent"></editView>
|
|
42
|
-
</el-tab-pane>
|
|
43
|
-
</template>
|
|
44
|
-
</x-tabs>
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<script>
|
|
49
|
-
import editView from './edit.vue';
|
|
50
|
-
import tableForm from "@base/components/table/tableForm.vue";
|
|
51
|
-
import {getBdFlag} from "@base/api/user";
|
|
52
|
-
|
|
53
|
-
export default {
|
|
54
|
-
name: 'form_script:list',
|
|
55
|
-
props: {
|
|
56
|
-
scriptType: {
|
|
57
|
-
type: Number,
|
|
58
|
-
default: 0
|
|
59
|
-
},
|
|
60
|
-
formCode: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: null
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
components: {tableForm, editView},
|
|
66
|
-
data() {
|
|
67
|
-
return {
|
|
68
|
-
activeName: 'second',
|
|
69
|
-
dataId: 0,
|
|
70
|
-
showEdit: false,
|
|
71
|
-
vxeOption: {},
|
|
72
|
-
formData: {},
|
|
73
|
-
isDev: true
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
mounted() {
|
|
77
|
-
this.getBdEnv();
|
|
78
|
-
this.initTableList();
|
|
79
|
-
},
|
|
80
|
-
methods: {
|
|
81
|
-
searchEvent() {
|
|
82
|
-
this.$refs['table-m1'].commitProxy('reload');
|
|
83
|
-
},
|
|
84
|
-
resetEvent() {
|
|
85
|
-
this.formData = {};
|
|
86
|
-
this.$refs['table-m1'].commitProxy('reload');
|
|
87
|
-
},
|
|
88
|
-
openEditDialog(row) {
|
|
89
|
-
/*this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
90
|
-
this.activeName = 'first';
|
|
91
|
-
this.$openEditView('showEdit');*/
|
|
92
|
-
|
|
93
|
-
let dataId = row?.id || 0;
|
|
94
|
-
if (!dataId) {
|
|
95
|
-
this.dataId = dataId;
|
|
96
|
-
this.activeName = 'first';
|
|
97
|
-
this.$openEditView('showEdit');
|
|
98
|
-
} else {
|
|
99
|
-
this.$refs.xTabs.openEditTab(row);
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
getSearchParam() {
|
|
103
|
-
return {
|
|
104
|
-
...this.formData,
|
|
105
|
-
formCode: this.formCode,
|
|
106
|
-
scriptType: this.scriptType
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
initTableList() {
|
|
110
|
-
let that = this;
|
|
111
|
-
let tableOption = {
|
|
112
|
-
vue: this,
|
|
113
|
-
tableRef: 'table-m1',
|
|
114
|
-
tableName: 'bd_form_script_list-m' + this.scriptType,
|
|
115
|
-
path: USER_PREFIX + '/formScript/listPage',
|
|
116
|
-
param: () => {
|
|
117
|
-
return this.getSearchParam();
|
|
118
|
-
},
|
|
119
|
-
columns: [
|
|
120
|
-
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
121
|
-
{
|
|
122
|
-
title: '脚本名称',
|
|
123
|
-
field: 'scriptName',
|
|
124
|
-
width: 180,
|
|
125
|
-
fixed: 'left'
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
title: '脚本编码',
|
|
129
|
-
field: 'scriptCode',
|
|
130
|
-
width: 180
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
title: '脚本说明',
|
|
134
|
-
field: 'scriptRemark',
|
|
135
|
-
width: 250
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
field: 'transactions',
|
|
139
|
-
title: '开启事务',
|
|
140
|
-
width: 150,
|
|
141
|
-
slots: {
|
|
142
|
-
default: ({row}) => {
|
|
143
|
-
if (row.transactions == 1) {
|
|
144
|
-
return [<div class="txt-status">是</div>];
|
|
145
|
-
} else {
|
|
146
|
-
return [<div class="txt-status s-3">否</div>];
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
field: 'sid',
|
|
153
|
-
title: '唯一标识',
|
|
154
|
-
width: 280
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
field: 'createDate',
|
|
158
|
-
title: this.$t1('创建时间'),
|
|
159
|
-
width: 150
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
width: 47,
|
|
163
|
-
fixed: 'right',
|
|
164
|
-
title: '',
|
|
165
|
-
sortable: false,
|
|
166
|
-
slots: {
|
|
167
|
-
default: ({row}) => {
|
|
168
|
-
return [
|
|
169
|
-
<div>
|
|
170
|
-
<a
|
|
171
|
-
href="javascript:void(0);"
|
|
172
|
-
class="a-link"
|
|
173
|
-
onclick={() => {
|
|
174
|
-
this.openEditDialog(row);
|
|
175
|
-
}}
|
|
176
|
-
>
|
|
177
|
-
<el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
|
|
178
|
-
popper-class="tooltip-skin">
|
|
179
|
-
<i class="el-icon-edit"/>
|
|
180
|
-
</el-tooltip>
|
|
181
|
-
</a>
|
|
182
|
-
</div>
|
|
183
|
-
];
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
],
|
|
188
|
-
searchColumns: [
|
|
189
|
-
{title: "脚本名称", field: "scriptName", type: "input", common: true},
|
|
190
|
-
{title: "脚本编码", field: "scriptCode", type: "input", common: true},
|
|
191
|
-
{title: "脚本说明", field: "scriptRemark", type: "input", common: true},
|
|
192
|
-
{title: "脚本", field: "script", type: "input", common: true},
|
|
193
|
-
]
|
|
194
|
-
};
|
|
195
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
196
|
-
this.vxeOption = opts;
|
|
197
|
-
});
|
|
198
|
-
},
|
|
199
|
-
jsonImport() {
|
|
200
|
-
this.$jsonImport({
|
|
201
|
-
saveUrl: USER_PREFIX + '/form_develop/importFormScript',
|
|
202
|
-
callback: () => {
|
|
203
|
-
this.searchEvent();
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
},
|
|
207
|
-
jsonExport() {
|
|
208
|
-
this.$jsonExport({
|
|
209
|
-
targetRef: "table-m1",
|
|
210
|
-
url: USER_PREFIX + "/form_develop/exportFormScript",
|
|
211
|
-
abcEnabled: true
|
|
212
|
-
})
|
|
213
|
-
},
|
|
214
|
-
getBdEnv() {
|
|
215
|
-
getBdFlag({
|
|
216
|
-
success: res => {
|
|
217
|
-
this.isDev = res.objx == 1
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="containt">
|
|
3
|
+
<x-tabs ref="xTabs" v-model="activeName" class="tab-box">
|
|
4
|
+
<el-tab-pane :label="$t1('常规')" name="first">
|
|
5
|
+
<editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
|
|
6
|
+
@reload="$reloadHandle" :formCode="formCode" :scriptType="scriptType"></editView>
|
|
7
|
+
</el-tab-pane>
|
|
8
|
+
<el-tab-pane :label="$t1('列表')" name="second">
|
|
9
|
+
<div class="grid-height">
|
|
10
|
+
<vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
|
|
11
|
+
@custom="$vxeTableUtil.customHandle">
|
|
12
|
+
<template #form>
|
|
13
|
+
<tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
|
|
14
|
+
<template #buttonLeft>
|
|
15
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog"
|
|
16
|
+
v-if="isDev">新增
|
|
17
|
+
</vxe-button>
|
|
18
|
+
<vxe-button status="success" class="button-sty" icon="el-icon-download" @click="jsonImport">导入发布
|
|
19
|
+
</vxe-button>
|
|
20
|
+
<vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport"
|
|
21
|
+
v-if="isDev">导出发布
|
|
22
|
+
</vxe-button>
|
|
23
|
+
</template>
|
|
24
|
+
<template #buttonRight>
|
|
25
|
+
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
|
26
|
+
plain>{{$t1('重置')}}
|
|
27
|
+
</vxe-button>
|
|
28
|
+
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
|
|
29
|
+
</vxe-button>
|
|
30
|
+
</template>
|
|
31
|
+
</tableForm>
|
|
32
|
+
</template>
|
|
33
|
+
</vxe-grid>
|
|
34
|
+
</div>
|
|
35
|
+
</el-tab-pane>
|
|
36
|
+
<template #editTab="{tab,index,reloadTabContent}">
|
|
37
|
+
<el-tab-pane :key="tab.data.id" :label.sync="tab.data.scriptName" :name="tab.data.id+''"
|
|
38
|
+
:closable="true">
|
|
39
|
+
<editView v-if="tab.showContent" :_dataId="tab.dataId" :formCode="formCode" :scriptType="scriptType"
|
|
40
|
+
:parent-target="_self"
|
|
41
|
+
@reload="reloadTabContent"></editView>
|
|
42
|
+
</el-tab-pane>
|
|
43
|
+
</template>
|
|
44
|
+
</x-tabs>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
import editView from './edit.vue';
|
|
50
|
+
import tableForm from "@base/components/table/tableForm.vue";
|
|
51
|
+
import {getBdFlag} from "@base/api/user";
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
name: 'form_script:list',
|
|
55
|
+
props: {
|
|
56
|
+
scriptType: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 0
|
|
59
|
+
},
|
|
60
|
+
formCode: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: null
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
components: {tableForm, editView},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
activeName: 'second',
|
|
69
|
+
dataId: 0,
|
|
70
|
+
showEdit: false,
|
|
71
|
+
vxeOption: {},
|
|
72
|
+
formData: {},
|
|
73
|
+
isDev: true
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
mounted() {
|
|
77
|
+
this.getBdEnv();
|
|
78
|
+
this.initTableList();
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
searchEvent() {
|
|
82
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
83
|
+
},
|
|
84
|
+
resetEvent() {
|
|
85
|
+
this.formData = {};
|
|
86
|
+
this.$refs['table-m1'].commitProxy('reload');
|
|
87
|
+
},
|
|
88
|
+
openEditDialog(row) {
|
|
89
|
+
/*this.dataId = !id || typeof id == 'object' ? 0 : id;
|
|
90
|
+
this.activeName = 'first';
|
|
91
|
+
this.$openEditView('showEdit');*/
|
|
92
|
+
|
|
93
|
+
let dataId = row?.id || 0;
|
|
94
|
+
if (!dataId) {
|
|
95
|
+
this.dataId = dataId;
|
|
96
|
+
this.activeName = 'first';
|
|
97
|
+
this.$openEditView('showEdit');
|
|
98
|
+
} else {
|
|
99
|
+
this.$refs.xTabs.openEditTab(row);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
getSearchParam() {
|
|
103
|
+
return {
|
|
104
|
+
...this.formData,
|
|
105
|
+
formCode: this.formCode,
|
|
106
|
+
scriptType: this.scriptType
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
initTableList() {
|
|
110
|
+
let that = this;
|
|
111
|
+
let tableOption = {
|
|
112
|
+
vue: this,
|
|
113
|
+
tableRef: 'table-m1',
|
|
114
|
+
tableName: 'bd_form_script_list-m' + this.scriptType,
|
|
115
|
+
path: USER_PREFIX + '/formScript/listPage',
|
|
116
|
+
param: () => {
|
|
117
|
+
return this.getSearchParam();
|
|
118
|
+
},
|
|
119
|
+
columns: [
|
|
120
|
+
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
121
|
+
{
|
|
122
|
+
title: '脚本名称',
|
|
123
|
+
field: 'scriptName',
|
|
124
|
+
width: 180,
|
|
125
|
+
fixed: 'left'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
title: '脚本编码',
|
|
129
|
+
field: 'scriptCode',
|
|
130
|
+
width: 180
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
title: '脚本说明',
|
|
134
|
+
field: 'scriptRemark',
|
|
135
|
+
width: 250
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
field: 'transactions',
|
|
139
|
+
title: '开启事务',
|
|
140
|
+
width: 150,
|
|
141
|
+
slots: {
|
|
142
|
+
default: ({row}) => {
|
|
143
|
+
if (row.transactions == 1) {
|
|
144
|
+
return [<div class="txt-status">是</div>];
|
|
145
|
+
} else {
|
|
146
|
+
return [<div class="txt-status s-3">否</div>];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
field: 'sid',
|
|
153
|
+
title: '唯一标识',
|
|
154
|
+
width: 280
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
field: 'createDate',
|
|
158
|
+
title: this.$t1('创建时间'),
|
|
159
|
+
width: 150
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
width: 47,
|
|
163
|
+
fixed: 'right',
|
|
164
|
+
title: '',
|
|
165
|
+
sortable: false,
|
|
166
|
+
slots: {
|
|
167
|
+
default: ({row}) => {
|
|
168
|
+
return [
|
|
169
|
+
<div>
|
|
170
|
+
<a
|
|
171
|
+
href="javascript:void(0);"
|
|
172
|
+
class="a-link"
|
|
173
|
+
onclick={() => {
|
|
174
|
+
this.openEditDialog(row);
|
|
175
|
+
}}
|
|
176
|
+
>
|
|
177
|
+
<el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
|
|
178
|
+
popper-class="tooltip-skin">
|
|
179
|
+
<i class="el-icon-edit"/>
|
|
180
|
+
</el-tooltip>
|
|
181
|
+
</a>
|
|
182
|
+
</div>
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
searchColumns: [
|
|
189
|
+
{title: "脚本名称", field: "scriptName", type: "input", common: true},
|
|
190
|
+
{title: "脚本编码", field: "scriptCode", type: "input", common: true},
|
|
191
|
+
{title: "脚本说明", field: "scriptRemark", type: "input", common: true},
|
|
192
|
+
{title: "脚本", field: "script", type: "input", common: true},
|
|
193
|
+
]
|
|
194
|
+
};
|
|
195
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
196
|
+
this.vxeOption = opts;
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
jsonImport() {
|
|
200
|
+
this.$jsonImport({
|
|
201
|
+
saveUrl: USER_PREFIX + '/form_develop/importFormScript',
|
|
202
|
+
callback: () => {
|
|
203
|
+
this.searchEvent();
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
},
|
|
207
|
+
jsonExport() {
|
|
208
|
+
this.$jsonExport({
|
|
209
|
+
targetRef: "table-m1",
|
|
210
|
+
url: USER_PREFIX + "/form_develop/exportFormScript",
|
|
211
|
+
abcEnabled: true
|
|
212
|
+
})
|
|
213
|
+
},
|
|
214
|
+
getBdEnv() {
|
|
215
|
+
getBdFlag({
|
|
216
|
+
success: res => {
|
|
217
|
+
this.isDev = res.objx == 1
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
</script>
|