cloud-web-corejs 1.0.54-dev.342 → 1.0.54-dev.344

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.
@@ -0,0 +1,265 @@
1
+ <template>
2
+ <div class="detail-wrap">
3
+ <el-form ref="editForm" :model="logicParam">
4
+ <div class="d-header clearfix">
5
+ <div class="fl">
6
+ <i class="el-icon-info" />
7
+ {{ title }}
8
+ </div>
9
+ <div class="fr">
10
+ <el-button
11
+ type="primary"
12
+ plain
13
+ class="button-sty"
14
+ @click="$baseReload()"
15
+ icon="el-icon-refresh-right"
16
+ >
17
+ {{ $t1("重置") }}
18
+ </el-button>
19
+ <el-button
20
+ type="primary"
21
+ class="button-sty"
22
+ icon="el-icon-check"
23
+ @click="saveData"
24
+ >{{ $t1("保存") }}
25
+ </el-button>
26
+ </div>
27
+ </div>
28
+ <div class="d-cont">
29
+ <div class="d-item">
30
+ <div class="title first">
31
+ <b>{{ $t1("基本信息") }}</b>
32
+ </div>
33
+ <table class="table-detail">
34
+ <tbody>
35
+ <tr>
36
+ <th>
37
+ <em class="f-red">*</em>
38
+ {{ $t1("参数编码") }}
39
+ </th>
40
+ <td colspan="5">
41
+ <el-form-item
42
+ prop="paramCode"
43
+ :rules="[{ required: true, trigger: 'blur' }]"
44
+ >
45
+ <el-input
46
+ type="text"
47
+ autocomplete="off"
48
+ v-model="logicParam.paramCode"
49
+ clearable
50
+ />
51
+ </el-form-item>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <th>{{ $t1("参数备注") }}</th>
56
+ <td colspan="5">
57
+ <el-input
58
+ type="textarea"
59
+ :rows="2"
60
+ :placeholder="$t1('请输入内容')"
61
+ size="small"
62
+ v-model="logicParam.remark"
63
+ clearable
64
+ ></el-input>
65
+ </td>
66
+ </tr>
67
+ <tr v-if="logicParam.paramType === 0">
68
+ <th>
69
+ <em class="f-red">*</em>
70
+ {{ $t1("组织编码") }}
71
+ </th>
72
+ <td colspan="5">
73
+ <el-form-item
74
+ prop="paramCompanyCode"
75
+ :rules="[{ required: true, trigger: 'blur' }]"
76
+ >
77
+ <el-input
78
+ type="text"
79
+ autocomplete="off"
80
+ v-model="logicParam.paramCompanyCode"
81
+ clearable
82
+ />
83
+ </el-form-item>
84
+ </td>
85
+ <td colspan="2">
86
+ <span class="tips_1">{{ $t1('注:多个用逗号","隔开') }}</span>
87
+ </td>
88
+ </tr>
89
+ <tr v-if="logicParam.paramType === 0">
90
+ <th>{{ $t1("是否启用") }}</th>
91
+ <td>
92
+ <el-form-item
93
+ prop="enabled"
94
+ :rules="[{ required: false, trigger: 'blur' }]"
95
+ >
96
+ <el-radio-group v-model="logicParam.enabled">
97
+ <el-radio :label="true">{{ $t1("启用") }}</el-radio>
98
+ <el-radio :label="false">{{ $t1("禁用") }}</el-radio>
99
+ </el-radio-group>
100
+ </el-form-item>
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <th>
105
+ {{ $t1("参数值") }}
106
+ <!-- <scriptDescriptionButton path="static/readme/RequestSetting.txt"></scriptDescriptionButton>
107
+ <scriptTestButton :script.sync="requestSetting.postScript"></scriptTestButton> -->
108
+ </th>
109
+ <td colspan="7">
110
+ <el-form-item
111
+ prop="paramValue"
112
+ :rules="[{ required: false, trigger: 'blur' }]"
113
+ >
114
+ <el-input
115
+ type="textarea"
116
+ :rows="2"
117
+ :placeholder="$t1('请输入内容')"
118
+ size="small"
119
+ v-model="logicParam.paramValue"
120
+ clearable
121
+ v-if="logicParam.paramType !== 2"
122
+ ></el-input>
123
+ <template v-else>
124
+ <code-editor
125
+ mode="json"
126
+ :readonly="!1"
127
+ v-model="logicParam.paramValue"
128
+ v-if="showCodeEditor"
129
+ ></code-editor>
130
+ </template>
131
+ </el-form-item>
132
+ </td>
133
+ </tr>
134
+
135
+ <tr>
136
+ <th>{{ $t1("创建人") }}</th>
137
+ <td>{{ logicParam.createBy }}</td>
138
+ <th>{{ $t1("创建时间") }}</th>
139
+ <td>{{ logicParam.createDate }}</td>
140
+ <th>{{ $t1("更新人") }}</th>
141
+ <td>{{ logicParam.modifyBy }}</td>
142
+ <th>{{ $t1("更新时间") }}</th>
143
+ <td>{{ logicParam.modifyDate }}</td>
144
+ </tr>
145
+ </tbody>
146
+ </table>
147
+ </div>
148
+ </div>
149
+ </el-form>
150
+ </div>
151
+ </template>
152
+
153
+ <script>
154
+ export default {
155
+ name: "logic_paramEdit",
156
+ props: {
157
+ _dataId: [String, Number],
158
+ copyId: [String, Number],
159
+ paramType: {
160
+ type: Number,
161
+ default: 0,
162
+ },
163
+ },
164
+ components: {},
165
+ data() {
166
+ return {
167
+ isEdit: false,
168
+ tabIndex: "first",
169
+ dataId: "",
170
+ logicParam: {
171
+ enabled: true,
172
+ paramValue: null,
173
+ paramType: this.paramType,
174
+ },
175
+ showCodeEditor: false,
176
+ paramTypeMap: {
177
+ 0: "逻辑参数",
178
+ 1: "操作日志编码",
179
+ 2: "上传文件服务",
180
+ },
181
+ };
182
+ },
183
+ computed: {
184
+ valueInputType() {
185
+ let paramType = this.logicParam.paramType;
186
+ let result = "text";
187
+ if (paramType == 2) {
188
+ return "json";
189
+ }
190
+ },
191
+ title() {
192
+ let paramType = this.logicParam.paramType;
193
+ let label = this.paramTypeMap[paramType];
194
+ let title = !!this.dataId ? `查看${label}` : `新增${label}`;
195
+ return this.$t1(title);
196
+ },
197
+ },
198
+ created() {
199
+ if (this._dataId && !isNaN(this._dataId)) this.dataId = this._dataId;
200
+ },
201
+ mounted() {
202
+ this.getData();
203
+ },
204
+ methods: {
205
+ getData() {
206
+ if (this.copyId) {
207
+ return;
208
+ }
209
+ if (this.dataId && !isNaN(this.dataId)) {
210
+ this.isEdit = true;
211
+ this.$commonHttp({
212
+ url: USER_PREFIX + `/logic_param/get`,
213
+ method: `post`,
214
+ data: {
215
+ id: this.dataId,
216
+ },
217
+ isLoading: true,
218
+ modalStrictly: true,
219
+ success: (res) => {
220
+ this.logicParam = res.objx || {};
221
+ this.showCodeEditor = true;
222
+ },
223
+ });
224
+ } else {
225
+ this.showCodeEditor = true;
226
+ }
227
+ },
228
+ saveData() {
229
+ this.$refs.editForm.$baseValidate((valid) => {
230
+ if (valid) {
231
+ this.$baseConfirm(this.$t1("您确定要保存吗?")).then(() => {
232
+ var url =
233
+ USER_PREFIX + (this.isEdit ? `/logic_param/update` : `/logic_param/save`);
234
+ this.$http({
235
+ url: url,
236
+ method: `post`,
237
+ data: this.logicParam,
238
+ isLoading: true,
239
+ success: (res) => {
240
+ this.$message({
241
+ message: res.content,
242
+ type: "success",
243
+ duration: 500,
244
+ onClose: (t) => {
245
+ if (this.isEdit) {
246
+ this.$baseReload();
247
+ } else {
248
+ this.$baseReload({
249
+ updateParam: {
250
+ _dataId: res.objx,
251
+ copyId: null,
252
+ },
253
+ });
254
+ }
255
+ },
256
+ });
257
+ },
258
+ });
259
+ });
260
+ }
261
+ });
262
+ },
263
+ },
264
+ };
265
+ </script>
@@ -0,0 +1,257 @@
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('常规')" name="first">
5
+ <editView
6
+ v-if="showEdit"
7
+ visible-key="showEdit"
8
+ :_dataId.sync="dataId"
9
+ :copyId.sync="copyId"
10
+ :parent-target="_self"
11
+ @reload="$reloadHandle"
12
+ :paramType="paramType"
13
+ ></editView>
14
+ </el-tab-pane>
15
+ <el-tab-pane :label="$t1('列表')" name="second">
16
+ <div class="grid-height">
17
+ <vxe-grid
18
+ ref="table-m1"
19
+ v-bind="vxeOption"
20
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
21
+ @custom="$vxeTableUtil.customHandle"
22
+ >
23
+ <template #form>
24
+ <tableForm
25
+ :formData.sync="formData"
26
+ @searchEvent="searchEvent"
27
+ @resetEvent="resetEvent"
28
+ >
29
+ <template #buttonLeft>
30
+ <vxe-button
31
+ status="primary"
32
+ class="button-sty"
33
+ icon="el-icon-plus"
34
+ @click="openEditDialog"
35
+ >
36
+ {{ $t1("新增") }}
37
+ </vxe-button>
38
+ </template>
39
+ <template #buttonRight>
40
+ <vxe-button
41
+ icon="el-icon-brush"
42
+ class="button-sty"
43
+ @click="resetEvent"
44
+ type="text"
45
+ status="primary"
46
+ plain
47
+ >{{ $t1("重置") }}
48
+ </vxe-button>
49
+ <vxe-button
50
+ status="warning"
51
+ icon="el-icon-search"
52
+ class="button-sty"
53
+ @click="searchEvent"
54
+ >
55
+ {{ $t1("搜索") }}
56
+ </vxe-button>
57
+ </template>
58
+ </tableForm>
59
+ </template>
60
+ </vxe-grid>
61
+ </div>
62
+ </el-tab-pane>
63
+ </el-tabs>
64
+ </div>
65
+ </template>
66
+
67
+ <script>
68
+ import editView from "./edit.vue";
69
+ import tableForm from "@base/components/table/tableForm.vue";
70
+
71
+ export default {
72
+ name: "logic_param:list",
73
+ props: {
74
+ paramType: {
75
+ type: Number,
76
+ default: 0,
77
+ },
78
+ },
79
+ components: { tableForm, editView },
80
+ data() {
81
+ return {
82
+ activeName: "second",
83
+ dataId: 0,
84
+ showEdit: false,
85
+ vxeOption: {},
86
+ formData: {},
87
+ };
88
+ },
89
+ mounted() {
90
+ this.initTableList();
91
+ },
92
+ methods: {
93
+ searchEvent() {
94
+ this.$refs["table-m1"].commitProxy("reload");
95
+ },
96
+ resetEvent() {
97
+ this.formData = {};
98
+ this.advancedFormData = {};
99
+ this.$refs["table-m1"].commitProxy("reload");
100
+ },
101
+ openEditDialog(id) {
102
+ this.copyId = 0;
103
+ this.dataId = !id || typeof id == "object" ? 0 : id;
104
+ this.activeName = "first";
105
+ this.$openEditView("showEdit");
106
+ },
107
+ initTableList() {
108
+ let that = this;
109
+ let otherColumns = [];
110
+ let otherSearchColumns = [];
111
+ if (this.paramType === 0) {
112
+ otherColumns = [
113
+ {
114
+ title: this.$t1("组织编码"),
115
+ field: "paramCompanyCode",
116
+ width: 150,
117
+ },
118
+ {
119
+ title: this.$t1("是否启用"),
120
+ field: "enabled",
121
+ width: 150,
122
+ slots: {
123
+ default: ({ row }) => {
124
+ if (row.enabled) {
125
+ return getJsxStatus(null, this.$t1("启用"));
126
+ } else {
127
+ return getJsxStatus("s-3", this.$t1("禁用"));
128
+ }
129
+ },
130
+ },
131
+ },
132
+ ];
133
+ otherSearchColumns = [
134
+ {
135
+ title: this.$t1("组织编码"),
136
+ field: "paramCompanyCode",
137
+ type: "input",
138
+ common: true,
139
+ },
140
+ {
141
+ title: this.$t1("是否启用"),
142
+ field: "enabled",
143
+ type: "select",
144
+ itemOption: [
145
+ {
146
+ label: this.$t1("启用"),
147
+ value: true,
148
+ },
149
+ {
150
+ label: this.$t1("禁用"),
151
+ value: false,
152
+ },
153
+ ],
154
+ common: true,
155
+ },
156
+ ];
157
+ }
158
+ let tableOption = {
159
+ vue: this,
160
+ tableRef: "table-m1",
161
+ tableName: "logic_param_list-m" + this.paramType,
162
+ path: USER_PREFIX + "/logic_param/listPage",
163
+ param: () => {
164
+ return {
165
+ ...this.formData,
166
+ paramType: this.paramType,
167
+ };
168
+ },
169
+ columns: [
170
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
171
+ {
172
+ title: this.$t1("参数编码"),
173
+ field: "paramCode",
174
+ width: 150,
175
+ fixed: "left",
176
+ },
177
+ {
178
+ title: this.$t1("参数备注"),
179
+ field: "remark",
180
+ width: 150,
181
+ },
182
+ ...otherColumns,
183
+ {
184
+ field: "createBy",
185
+ title: this.$t1("创建人"),
186
+ width: 150,
187
+ },
188
+ {
189
+ field: "createDate",
190
+ title: this.$t1("创建时间"),
191
+ width: 150,
192
+ },
193
+ {
194
+ field: "modifyBy",
195
+ title: this.$t1("更新人"),
196
+ width: 150,
197
+ },
198
+ {
199
+ field: "modifyDate",
200
+ title: this.$t1("更新时间"),
201
+ width: 150,
202
+ },
203
+ {
204
+ width: 47,
205
+ fixed: "right",
206
+ title: "",
207
+ sortable: false,
208
+ slots: {
209
+ default: ({ row }) => {
210
+ return [
211
+ <div>
212
+ <a
213
+ href="javascript:void(0);"
214
+ class="a-link"
215
+ onclick={() => {
216
+ this.openEditDialog(row.id);
217
+ }}
218
+ >
219
+ <el-tooltip
220
+ enterable={false}
221
+ effect="dark"
222
+ content={this.$t1("查看")}
223
+ placement="top"
224
+ popper-class="tooltip-skin"
225
+ >
226
+ <i class="el-icon-edit" />
227
+ </el-tooltip>
228
+ </a>
229
+ </div>,
230
+ ];
231
+ },
232
+ },
233
+ },
234
+ ],
235
+ searchColumns: [
236
+ {
237
+ title: this.$t1("参数编码"),
238
+ field: "paramCode",
239
+ type: "input",
240
+ common: true,
241
+ },
242
+ {
243
+ title: this.$t1("参数备注"),
244
+ field: "remark",
245
+ type: "input",
246
+ common: true,
247
+ },
248
+ ...otherSearchColumns,
249
+ ],
250
+ };
251
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
252
+ this.vxeOption = opts;
253
+ });
254
+ },
255
+ },
256
+ };
257
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <listView :paramType="1"></listView>
3
+ </template>
4
+
5
+ <script>
6
+ import listView from "./list.vue";
7
+
8
+ export default {
9
+ name: "logic_param:list1",
10
+ components: { listView },
11
+ };
12
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <listView :paramType="2"></listView>
3
+ </template>
4
+
5
+ <script>
6
+ import listView from "./list.vue";
7
+
8
+ export default {
9
+ name: "logic_param:list2",
10
+ components: { listView },
11
+ };
12
+ </script>