cloud-web-corejs 1.0.54-dev.134 → 1.0.54-dev.136
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/table/tableFormMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1171 -1041
- package/src/components/xform/form-render/container-item/data-table-item.vue +1 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +25 -0
- package/src/views/bd/setting/table_model/mixins/edit copy.js +903 -0
- package/src/views/bd/setting/table_model/mixins/edit.js +282 -240
- package/src/views/support/export_template/edit.vue +2 -17
- package/src/views/support/export_template/list.vue +0 -14
- package/src/views/user/notify_template/edit.vue +188 -187
- package/src/views/user/notify_template/edit2.vue +176 -0
- package/src/views/user/notify_template/list.vue +4 -1
- package/src/views/user/notify_template/list2.vue +190 -0
@@ -76,10 +76,6 @@
|
|
76
76
|
<el-input type="text" autocomplete="off" v-model="exportTemplate.etCompanyCode" clearable/>
|
77
77
|
</el-form-item>
|
78
78
|
</td>
|
79
|
-
|
80
|
-
|
81
|
-
</tr>
|
82
|
-
<tr>
|
83
79
|
<th>
|
84
80
|
{{ $t1('是否启用') }}
|
85
81
|
</th>
|
@@ -91,21 +87,10 @@
|
|
91
87
|
</el-radio-group>
|
92
88
|
</el-form-item>
|
93
89
|
</td>
|
94
|
-
<th>
|
95
|
-
{{ $t1('通知类型') }}
|
96
|
-
</th>
|
97
|
-
<td colspan="3">
|
98
|
-
<el-form-item prop="ntType;" :rules="[{ required: false, trigger: 'blur' }]">
|
99
|
-
<el-radio-group v-model="exportTemplate.ntType">
|
100
|
-
<el-radio :label="0">{{ $t1('系统通知') }}</el-radio>
|
101
|
-
<el-radio :label="1">{{ $t1('邮件通知') }}</el-radio>
|
102
|
-
</el-radio-group>
|
103
|
-
</el-form-item>
|
104
|
-
</td>
|
105
90
|
</tr>
|
106
91
|
<tr>
|
107
92
|
<th>{{ $t1('备注') }}</th>
|
108
|
-
<td colspan="
|
93
|
+
<td colspan="7">
|
109
94
|
<el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
|
110
95
|
v-model="exportTemplate.remark"
|
111
96
|
clearable></el-input>
|
@@ -203,7 +188,7 @@ export default {
|
|
203
188
|
isEdit: false,
|
204
189
|
tabIndex: 'first',
|
205
190
|
dataId: '',
|
206
|
-
exportTemplate: {enabled: true, etType: null
|
191
|
+
exportTemplate: {enabled: true, etType: null},
|
207
192
|
showCodeEditor: false,
|
208
193
|
showHiprintDesignDialog: false,
|
209
194
|
printTypes: [2, 3, 6, 7, 8, 9],
|
@@ -136,10 +136,6 @@ export default {
|
|
136
136
|
7: this.$t1('拼多多打印'),
|
137
137
|
8: this.$t1('唯品会打印'),
|
138
138
|
9: this.$t1('小红书打印')
|
139
|
-
},
|
140
|
-
ntTypeMap: {
|
141
|
-
0: this.$t1('系统通知'),
|
142
|
-
1: this.$t1('邮件通知')
|
143
139
|
}
|
144
140
|
};
|
145
141
|
},
|
@@ -206,16 +202,6 @@ export default {
|
|
206
202
|
},
|
207
203
|
},
|
208
204
|
},
|
209
|
-
{
|
210
|
-
title: this.$t1('通知类型'),
|
211
|
-
field: "ntType",
|
212
|
-
width: 250,
|
213
|
-
slots: {
|
214
|
-
default: ({row}) => {
|
215
|
-
return this.ntTypeMap[row.ntType] || "";
|
216
|
-
},
|
217
|
-
},
|
218
|
-
},
|
219
205
|
{
|
220
206
|
title: this.$t1('组织编码'),
|
221
207
|
field: "etCompanyCode",
|
@@ -1,187 +1,188 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="detail-wrap">
|
3
|
-
<el-form ref="editForm" :model="notifyTemplate">
|
4
|
-
<div class="d-header clearfix">
|
5
|
-
<div class="fl">
|
6
|
-
<i class="el-icon-info"/>
|
7
|
-
{{ dataId ? $t1('查看通知模板') : $t1('新增通知模板') }}
|
8
|
-
</div>
|
9
|
-
<div class="fr">
|
10
|
-
<el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
|
11
|
-
{{ $t1('重置') }}
|
12
|
-
</el-button>
|
13
|
-
<el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData">{{ $t1('保存') }}
|
14
|
-
</el-button>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
<baseTabs>
|
18
|
-
<baseTabPane :label="$t1('基本信息')">
|
19
|
-
<template #default>
|
20
|
-
<table class="table-detail">
|
21
|
-
<tbody>
|
22
|
-
<tr>
|
23
|
-
<th><em class="f-red">*</em>{{ $t1('通知模板编码') }}</th>
|
24
|
-
<td>
|
25
|
-
<el-form-item prop="notifyType" :rules="[{ required: true, trigger: 'blur' }]">
|
26
|
-
<el-input type="text" autocomplete="off" v-model="notifyTemplate.notifyType" clearable/>
|
27
|
-
</el-form-item>
|
28
|
-
</td>
|
29
|
-
<th>
|
30
|
-
<em class="f-red">*</em>
|
31
|
-
{{ $t1('通知模板名称') }}
|
32
|
-
</th>
|
33
|
-
<td>
|
34
|
-
<el-form-item prop="ntName" :rules="[{ required: true, trigger: 'blur' }]">
|
35
|
-
<el-input type="text" autocomplete="off" v-model="notifyTemplate.ntName" clearable/>
|
36
|
-
</el-form-item>
|
37
|
-
</td>
|
38
|
-
<th>{{ $t1('是否启用') }}</th>
|
39
|
-
<td>
|
40
|
-
<el-form-item prop="enabled" :rules="[{ required: false, trigger: 'blur' }]">
|
41
|
-
<el-radio-group v-model="notifyTemplate.enabled">
|
42
|
-
<el-radio :label="true">{{ $t1('启用') }}</el-radio>
|
43
|
-
<el-radio :label="false">{{ $t1('禁用') }}</el-radio>
|
44
|
-
</el-radio-group>
|
45
|
-
</el-form-item>
|
46
|
-
</td>
|
47
|
-
</tr>
|
48
|
-
<tr>
|
49
|
-
<th><em class="f-red">*</em>{{ $t1('通知内容') }}</th>
|
50
|
-
<td colspan="5">
|
51
|
-
<el-form-item prop="content" :rules="[{ required: true, trigger: 'blur' }]">
|
52
|
-
<el-input type="textarea" :rows="2" size="small"
|
53
|
-
v-model="notifyTemplate.content"
|
54
|
-
clearable></el-input>
|
55
|
-
</el-form-item>
|
56
|
-
</td>
|
57
|
-
</tr>
|
58
|
-
<tr>
|
59
|
-
<th>{{ $t1('跳转内容') }}</th>
|
60
|
-
<td colspan="5">
|
61
|
-
<el-form-item prop="jumpContent" :rules="[{ required: false, trigger: 'blur' }]">
|
62
|
-
<el-input type="textarea" :rows="2" size="small"
|
63
|
-
v-model="notifyTemplate.jumpContent"
|
64
|
-
clearable></el-input>
|
65
|
-
</el-form-item>
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
<tr>
|
69
|
-
<th>{{ $t1('备注') }}</th>
|
70
|
-
<td colspan="5">
|
71
|
-
<el-input type="textarea" :rows="2" size="small" v-model="notifyTemplate.remark"
|
72
|
-
clearable></el-input>
|
73
|
-
</td>
|
74
|
-
</tr>
|
75
|
-
<tr>
|
76
|
-
<th>
|
77
|
-
{{ $t1('脚本(获取通知人)') }}
|
78
|
-
<!-- <scriptDescriptionButton path="static/readme/PushSetting.txt"></scriptDescriptionButton>-->
|
79
|
-
<scriptTestButton :script.sync="notifyTemplate.script"></scriptTestButton>
|
80
|
-
</th>
|
81
|
-
<td colspan="7">
|
82
|
-
<el-form-item prop="script" :rules="[{ required: false, trigger: 'blur' }]">
|
83
|
-
<code-editor mode="java" :readonly="!1" v-model="notifyTemplate.script"
|
84
|
-
v-if="showCodeEditor"></code-editor>
|
85
|
-
</el-form-item>
|
86
|
-
</td>
|
87
|
-
</tr>
|
88
|
-
<tr>
|
89
|
-
<th>{{ $t1('创建人') }}</th>
|
90
|
-
<td>{{ notifyTemplate.createBy }}</td>
|
91
|
-
<th>{{ $t1('创建时间') }}</th>
|
92
|
-
<td>{{ notifyTemplate.createDate }}</td>
|
93
|
-
<th>{{ $t1('更新人') }}</th>
|
94
|
-
<td>{{ notifyTemplate.modifyBy }}</td>
|
95
|
-
<th>{{ $t1('更新时间') }}</th>
|
96
|
-
<td>{{ notifyTemplate.modifyDate }}</td>
|
97
|
-
</tr>
|
98
|
-
</tbody>
|
99
|
-
</table>
|
100
|
-
</template>
|
101
|
-
</baseTabPane>
|
102
|
-
</baseTabs>
|
103
|
-
</el-form>
|
104
|
-
</div>
|
105
|
-
</template>
|
106
|
-
|
107
|
-
<script>
|
108
|
-
export default {
|
109
|
-
name: 'notify_templateEdit',
|
110
|
-
props: {
|
111
|
-
_dataId: [String, Number]
|
112
|
-
},
|
113
|
-
components: {},
|
114
|
-
data() {
|
115
|
-
return {
|
116
|
-
isEdit: false,
|
117
|
-
tabIndex: 'first',
|
118
|
-
dataId: '',
|
119
|
-
notifyTemplate: {
|
120
|
-
enabled: true
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
this
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
this.
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
this
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
}
|
187
|
-
|
1
|
+
<template>
|
2
|
+
<div class="detail-wrap">
|
3
|
+
<el-form ref="editForm" :model="notifyTemplate">
|
4
|
+
<div class="d-header clearfix">
|
5
|
+
<div class="fl">
|
6
|
+
<i class="el-icon-info"/>
|
7
|
+
{{ dataId ? $t1('查看通知模板') : $t1('新增通知模板') }}
|
8
|
+
</div>
|
9
|
+
<div class="fr">
|
10
|
+
<el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
|
11
|
+
{{ $t1('重置') }}
|
12
|
+
</el-button>
|
13
|
+
<el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData">{{ $t1('保存') }}
|
14
|
+
</el-button>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<baseTabs>
|
18
|
+
<baseTabPane :label="$t1('基本信息')">
|
19
|
+
<template #default>
|
20
|
+
<table class="table-detail">
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<th><em class="f-red">*</em>{{ $t1('通知模板编码') }}</th>
|
24
|
+
<td>
|
25
|
+
<el-form-item prop="notifyType" :rules="[{ required: true, trigger: 'blur' }]">
|
26
|
+
<el-input type="text" autocomplete="off" v-model="notifyTemplate.notifyType" clearable/>
|
27
|
+
</el-form-item>
|
28
|
+
</td>
|
29
|
+
<th>
|
30
|
+
<em class="f-red">*</em>
|
31
|
+
{{ $t1('通知模板名称') }}
|
32
|
+
</th>
|
33
|
+
<td>
|
34
|
+
<el-form-item prop="ntName" :rules="[{ required: true, trigger: 'blur' }]">
|
35
|
+
<el-input type="text" autocomplete="off" v-model="notifyTemplate.ntName" clearable/>
|
36
|
+
</el-form-item>
|
37
|
+
</td>
|
38
|
+
<th>{{ $t1('是否启用') }}</th>
|
39
|
+
<td>
|
40
|
+
<el-form-item prop="enabled" :rules="[{ required: false, trigger: 'blur' }]">
|
41
|
+
<el-radio-group v-model="notifyTemplate.enabled">
|
42
|
+
<el-radio :label="true">{{ $t1('启用') }}</el-radio>
|
43
|
+
<el-radio :label="false">{{ $t1('禁用') }}</el-radio>
|
44
|
+
</el-radio-group>
|
45
|
+
</el-form-item>
|
46
|
+
</td>
|
47
|
+
</tr>
|
48
|
+
<tr>
|
49
|
+
<th><em class="f-red">*</em>{{ $t1('通知内容') }}</th>
|
50
|
+
<td colspan="5">
|
51
|
+
<el-form-item prop="content" :rules="[{ required: true, trigger: 'blur' }]">
|
52
|
+
<el-input type="textarea" :rows="2" size="small"
|
53
|
+
v-model="notifyTemplate.content"
|
54
|
+
clearable></el-input>
|
55
|
+
</el-form-item>
|
56
|
+
</td>
|
57
|
+
</tr>
|
58
|
+
<tr>
|
59
|
+
<th>{{ $t1('跳转内容') }}</th>
|
60
|
+
<td colspan="5">
|
61
|
+
<el-form-item prop="jumpContent" :rules="[{ required: false, trigger: 'blur' }]">
|
62
|
+
<el-input type="textarea" :rows="2" size="small"
|
63
|
+
v-model="notifyTemplate.jumpContent"
|
64
|
+
clearable></el-input>
|
65
|
+
</el-form-item>
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
<tr>
|
69
|
+
<th>{{ $t1('备注') }}</th>
|
70
|
+
<td colspan="5">
|
71
|
+
<el-input type="textarea" :rows="2" size="small" v-model="notifyTemplate.remark"
|
72
|
+
clearable></el-input>
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
<tr>
|
76
|
+
<th>
|
77
|
+
{{ $t1('脚本(获取通知人)') }}
|
78
|
+
<!-- <scriptDescriptionButton path="static/readme/PushSetting.txt"></scriptDescriptionButton>-->
|
79
|
+
<scriptTestButton :script.sync="notifyTemplate.script"></scriptTestButton>
|
80
|
+
</th>
|
81
|
+
<td colspan="7">
|
82
|
+
<el-form-item prop="script" :rules="[{ required: false, trigger: 'blur' }]">
|
83
|
+
<code-editor mode="java" :readonly="!1" v-model="notifyTemplate.script"
|
84
|
+
v-if="showCodeEditor"></code-editor>
|
85
|
+
</el-form-item>
|
86
|
+
</td>
|
87
|
+
</tr>
|
88
|
+
<tr>
|
89
|
+
<th>{{ $t1('创建人') }}</th>
|
90
|
+
<td>{{ notifyTemplate.createBy }}</td>
|
91
|
+
<th>{{ $t1('创建时间') }}</th>
|
92
|
+
<td>{{ notifyTemplate.createDate }}</td>
|
93
|
+
<th>{{ $t1('更新人') }}</th>
|
94
|
+
<td>{{ notifyTemplate.modifyBy }}</td>
|
95
|
+
<th>{{ $t1('更新时间') }}</th>
|
96
|
+
<td>{{ notifyTemplate.modifyDate }}</td>
|
97
|
+
</tr>
|
98
|
+
</tbody>
|
99
|
+
</table>
|
100
|
+
</template>
|
101
|
+
</baseTabPane>
|
102
|
+
</baseTabs>
|
103
|
+
</el-form>
|
104
|
+
</div>
|
105
|
+
</template>
|
106
|
+
|
107
|
+
<script>
|
108
|
+
export default {
|
109
|
+
name: 'notify_templateEdit',
|
110
|
+
props: {
|
111
|
+
_dataId: [String, Number]
|
112
|
+
},
|
113
|
+
components: {},
|
114
|
+
data() {
|
115
|
+
return {
|
116
|
+
isEdit: false,
|
117
|
+
tabIndex: 'first',
|
118
|
+
dataId: '',
|
119
|
+
notifyTemplate: {
|
120
|
+
enabled: true,
|
121
|
+
ntType:0
|
122
|
+
},
|
123
|
+
showCodeEditor: false
|
124
|
+
};
|
125
|
+
},
|
126
|
+
created() {
|
127
|
+
if (this._dataId && !isNaN(this._dataId)) this.dataId = this._dataId;
|
128
|
+
},
|
129
|
+
mounted() {
|
130
|
+
this.getData();
|
131
|
+
},
|
132
|
+
methods: {
|
133
|
+
getData() {
|
134
|
+
if (this.dataId && !isNaN(this.dataId)) {
|
135
|
+
this.isEdit = true;
|
136
|
+
this.$commonHttp({
|
137
|
+
url: USER_PREFIX + `/notify_template/get`,
|
138
|
+
method: `post`,
|
139
|
+
data: {
|
140
|
+
id: this.dataId
|
141
|
+
},
|
142
|
+
isLoading: true,
|
143
|
+
modalStrictly: true,
|
144
|
+
success: res => {
|
145
|
+
this.notifyTemplate = res.objx || {};
|
146
|
+
this.showCodeEditor = true;
|
147
|
+
}
|
148
|
+
});
|
149
|
+
} else {
|
150
|
+
this.showCodeEditor = true;
|
151
|
+
}
|
152
|
+
},
|
153
|
+
saveData() {
|
154
|
+
this.$refs.editForm.$baseValidate(valid => {
|
155
|
+
if (valid) {
|
156
|
+
this.$baseConfirm(this.$t1('您确定要保存吗?')).then(() => {
|
157
|
+
var url = USER_PREFIX + (this.isEdit ? `/notify_template/update` : `/notify_template/save`);
|
158
|
+
this.$http({
|
159
|
+
url: url,
|
160
|
+
method: `post`,
|
161
|
+
data: this.notifyTemplate,
|
162
|
+
isLoading: true,
|
163
|
+
success: res => {
|
164
|
+
this.$message({
|
165
|
+
message: res.content,
|
166
|
+
type: 'success',
|
167
|
+
duration: 500,
|
168
|
+
onClose: t => {
|
169
|
+
if (this.isEdit) {
|
170
|
+
this.$baseReload();
|
171
|
+
} else {
|
172
|
+
this.$baseReload({
|
173
|
+
updateParam: {
|
174
|
+
_dataId: res.objx
|
175
|
+
}
|
176
|
+
});
|
177
|
+
}
|
178
|
+
}
|
179
|
+
});
|
180
|
+
}
|
181
|
+
});
|
182
|
+
});
|
183
|
+
}
|
184
|
+
});
|
185
|
+
}
|
186
|
+
}
|
187
|
+
};
|
188
|
+
</script>
|
@@ -0,0 +1,176 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="detail-wrap">
|
3
|
+
<el-form ref="editForm" :model="notifyTemplate">
|
4
|
+
<div class="d-header clearfix">
|
5
|
+
<div class="fl">
|
6
|
+
<i class="el-icon-info"/>
|
7
|
+
{{ dataId ? $t1('查看邮件模板') : $t1('新增邮件模板') }}
|
8
|
+
</div>
|
9
|
+
<div class="fr">
|
10
|
+
<el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
|
11
|
+
{{ $t1('重置') }}
|
12
|
+
</el-button>
|
13
|
+
<el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData">{{ $t1('保存') }}
|
14
|
+
</el-button>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<baseTabs>
|
18
|
+
<baseTabPane :label="$t1('基本信息')">
|
19
|
+
<template #default>
|
20
|
+
<table class="table-detail">
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<th><em class="f-red">*</em>{{ $t1('邮件模板编码') }}</th>
|
24
|
+
<td>
|
25
|
+
<el-form-item prop="notifyType" :rules="[{ required: true, trigger: 'blur' }]">
|
26
|
+
<el-input type="text" autocomplete="off" v-model="notifyTemplate.notifyType" clearable/>
|
27
|
+
</el-form-item>
|
28
|
+
</td>
|
29
|
+
<th>
|
30
|
+
<em class="f-red">*</em>
|
31
|
+
{{ $t1('主题') }}
|
32
|
+
</th>
|
33
|
+
<td>
|
34
|
+
<el-form-item prop="ntName" :rules="[{ required: true, trigger: 'blur' }]">
|
35
|
+
<el-input type="text" autocomplete="off" v-model="notifyTemplate.ntName" clearable/>
|
36
|
+
</el-form-item>
|
37
|
+
</td>
|
38
|
+
<th>{{ $t1('是否启用') }}</th>
|
39
|
+
<td>
|
40
|
+
<el-form-item prop="enabled" :rules="[{ required: false, trigger: 'blur' }]">
|
41
|
+
<el-radio-group v-model="notifyTemplate.enabled">
|
42
|
+
<el-radio :label="true">{{ $t1('启用') }}</el-radio>
|
43
|
+
<el-radio :label="false">{{ $t1('禁用') }}</el-radio>
|
44
|
+
</el-radio-group>
|
45
|
+
</el-form-item>
|
46
|
+
</td>
|
47
|
+
</tr>
|
48
|
+
<tr>
|
49
|
+
<th>{{ $t1('备注') }}</th>
|
50
|
+
<td colspan="7">
|
51
|
+
<el-input type="textarea" :rows="2" size="small" v-model="notifyTemplate.remark"
|
52
|
+
clearable></el-input>
|
53
|
+
</td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<th><em class="f-red">*</em>{{ $t1('内容') }}</th>
|
57
|
+
<td colspan="7">
|
58
|
+
<el-form-item prop="content" :rules="[{ required: true, trigger: 'blur' }]">
|
59
|
+
<tinymce v-model="notifyTemplate.content" :language="lan" :height="300"/>
|
60
|
+
</el-form-item>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<th>
|
65
|
+
{{ $t1('脚本(获取通知人)') }}
|
66
|
+
<scriptTestButton :script.sync="notifyTemplate.script"></scriptTestButton>
|
67
|
+
</th>
|
68
|
+
<td colspan="7">
|
69
|
+
<el-form-item prop="script" :rules="[{ required: false, trigger: 'blur' }]">
|
70
|
+
<code-editor mode="java" :readonly="!1" v-model="notifyTemplate.script"
|
71
|
+
v-if="showCodeEditor"></code-editor>
|
72
|
+
</el-form-item>
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
<tr>
|
76
|
+
<th>{{ $t1('创建人') }}</th>
|
77
|
+
<td>{{ notifyTemplate.createBy }}</td>
|
78
|
+
<th>{{ $t1('创建时间') }}</th>
|
79
|
+
<td>{{ notifyTemplate.createDate }}</td>
|
80
|
+
<th>{{ $t1('更新人') }}</th>
|
81
|
+
<td>{{ notifyTemplate.modifyBy }}</td>
|
82
|
+
<th>{{ $t1('更新时间') }}</th>
|
83
|
+
<td>{{ notifyTemplate.modifyDate }}</td>
|
84
|
+
</tr>
|
85
|
+
</tbody>
|
86
|
+
</table>
|
87
|
+
</template>
|
88
|
+
</baseTabPane>
|
89
|
+
</baseTabs>
|
90
|
+
</el-form>
|
91
|
+
</div>
|
92
|
+
</template>
|
93
|
+
|
94
|
+
<script>
|
95
|
+
import Tinymce from '@base/components/Tinymce';
|
96
|
+
export default {
|
97
|
+
name: 'notify_templateEdit',
|
98
|
+
props: {
|
99
|
+
_dataId: [String, Number]
|
100
|
+
},
|
101
|
+
components: {Tinymce},
|
102
|
+
data() {
|
103
|
+
return {
|
104
|
+
isEdit: false,
|
105
|
+
tabIndex: 'first',
|
106
|
+
dataId: '',
|
107
|
+
notifyTemplate: {
|
108
|
+
enabled: true,
|
109
|
+
ntType:1
|
110
|
+
},
|
111
|
+
showCodeEditor: false
|
112
|
+
};
|
113
|
+
},
|
114
|
+
created() {
|
115
|
+
if (this._dataId && !isNaN(this._dataId)) this.dataId = this._dataId;
|
116
|
+
},
|
117
|
+
mounted() {
|
118
|
+
this.getData();
|
119
|
+
},
|
120
|
+
methods: {
|
121
|
+
getData() {
|
122
|
+
if (this.dataId && !isNaN(this.dataId)) {
|
123
|
+
this.isEdit = true;
|
124
|
+
this.$commonHttp({
|
125
|
+
url: USER_PREFIX + `/notify_template/get`,
|
126
|
+
method: `post`,
|
127
|
+
data: {
|
128
|
+
id: this.dataId
|
129
|
+
},
|
130
|
+
isLoading: true,
|
131
|
+
modalStrictly: true,
|
132
|
+
success: res => {
|
133
|
+
this.notifyTemplate = res.objx || {};
|
134
|
+
this.showCodeEditor = true;
|
135
|
+
}
|
136
|
+
});
|
137
|
+
} else {
|
138
|
+
this.showCodeEditor = true;
|
139
|
+
}
|
140
|
+
},
|
141
|
+
saveData() {
|
142
|
+
this.$refs.editForm.$baseValidate(valid => {
|
143
|
+
if (valid) {
|
144
|
+
this.$baseConfirm(this.$t1('您确定要保存吗?')).then(() => {
|
145
|
+
var url = USER_PREFIX + (this.isEdit ? `/notify_template/update` : `/notify_template/save`);
|
146
|
+
this.$http({
|
147
|
+
url: url,
|
148
|
+
method: `post`,
|
149
|
+
data: this.notifyTemplate,
|
150
|
+
isLoading: true,
|
151
|
+
success: res => {
|
152
|
+
this.$message({
|
153
|
+
message: res.content,
|
154
|
+
type: 'success',
|
155
|
+
duration: 500,
|
156
|
+
onClose: t => {
|
157
|
+
if (this.isEdit) {
|
158
|
+
this.$baseReload();
|
159
|
+
} else {
|
160
|
+
this.$baseReload({
|
161
|
+
updateParam: {
|
162
|
+
_dataId: res.objx
|
163
|
+
}
|
164
|
+
});
|
165
|
+
}
|
166
|
+
}
|
167
|
+
});
|
168
|
+
}
|
169
|
+
});
|
170
|
+
});
|
171
|
+
}
|
172
|
+
});
|
173
|
+
}
|
174
|
+
}
|
175
|
+
};
|
176
|
+
</script>
|
@@ -95,7 +95,10 @@ export default {
|
|
95
95
|
tableName: 'basic_notifyTemplate_list-m1',
|
96
96
|
path: USER_PREFIX + '/notify_template/listPage',
|
97
97
|
param: () => {
|
98
|
-
return
|
98
|
+
return {
|
99
|
+
...this.formData,
|
100
|
+
ntType: 0
|
101
|
+
};
|
99
102
|
},
|
100
103
|
columns: [
|
101
104
|
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|