cloud-web-corejs 1.0.54-dev.135 → 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/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/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
@@ -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'},
|
@@ -0,0 +1,190 @@
|
|
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 v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
|
6
|
+
@reload="$reloadHandle"></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
|
+
<div class="clearfix screen-btns">
|
14
|
+
<div class="fl">
|
15
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog">
|
16
|
+
{{ $t1('新增') }}
|
17
|
+
</vxe-button>
|
18
|
+
<base-table-export :option="{ title: $t1('邮件模板导出'), targetRef: 'table-m1'}"
|
19
|
+
:parent-target="_self"/>
|
20
|
+
</div>
|
21
|
+
<div class="fr">
|
22
|
+
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
23
|
+
plain>{{ $t1('重置') }}
|
24
|
+
</vxe-button>
|
25
|
+
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
26
|
+
{{ $t1('搜索') }}
|
27
|
+
</vxe-button>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
|
31
|
+
@submit="searchEvent" @reset="searchEvent">
|
32
|
+
<vxe-form-item :title="$t1('邮件模板编码')+':'" field="ntCode">
|
33
|
+
<template v-slot>
|
34
|
+
<el-input v-model="formData.notifyType" size="small" clearable/>
|
35
|
+
</template>
|
36
|
+
</vxe-form-item>
|
37
|
+
<vxe-form-item :title="$t1('主题')+':'" field="ntName">
|
38
|
+
<template v-slot>
|
39
|
+
<el-input v-model="formData.ntName" size="small" clearable/>
|
40
|
+
</template>
|
41
|
+
</vxe-form-item>
|
42
|
+
<vxe-form-item :title="$t1('是否启用')+':'">
|
43
|
+
<template v-slot>
|
44
|
+
<el-select v-model="formData.enabled" clearable>
|
45
|
+
<el-option :value="true" :label="$t1('启用')"></el-option>
|
46
|
+
<el-option :value="false" :label="$t1('禁用')"></el-option>
|
47
|
+
</el-select>
|
48
|
+
</template>
|
49
|
+
</vxe-form-item>
|
50
|
+
</vxe-form>
|
51
|
+
</template>
|
52
|
+
</vxe-grid>
|
53
|
+
</div>
|
54
|
+
</el-tab-pane>
|
55
|
+
</el-tabs>
|
56
|
+
</div>
|
57
|
+
</template>
|
58
|
+
|
59
|
+
<script>
|
60
|
+
import editView from './edit2.vue';
|
61
|
+
|
62
|
+
export default {
|
63
|
+
name: 'notify_template:list2',
|
64
|
+
components: {editView},
|
65
|
+
data() {
|
66
|
+
return {
|
67
|
+
activeName: 'second',
|
68
|
+
dataId: 0,
|
69
|
+
showEdit: false,
|
70
|
+
vxeOption: {},
|
71
|
+
formData: {}
|
72
|
+
};
|
73
|
+
},
|
74
|
+
mounted() {
|
75
|
+
this.initTableList();
|
76
|
+
},
|
77
|
+
methods: {
|
78
|
+
searchEvent() {
|
79
|
+
this.$refs['table-m1'].commitProxy('reload');
|
80
|
+
},
|
81
|
+
resetEvent() {
|
82
|
+
this.formData = {};
|
83
|
+
this.$refs['table-m1'].commitProxy('reload');
|
84
|
+
},
|
85
|
+
openEditDialog(id) {
|
86
|
+
this.dataId = !id || typeof id == 'object' ? 0 : id;
|
87
|
+
this.activeName = 'first';
|
88
|
+
this.$openEditView('showEdit');
|
89
|
+
},
|
90
|
+
initTableList() {
|
91
|
+
let that = this;
|
92
|
+
let tableOption = {
|
93
|
+
vue: this,
|
94
|
+
tableRef: 'table-m1',
|
95
|
+
tableName: 'basic_notifyTemplate_list-m2',
|
96
|
+
path: USER_PREFIX + '/notify_template/listPage',
|
97
|
+
param: () => {
|
98
|
+
return {
|
99
|
+
...this.formData,
|
100
|
+
ntType: 1
|
101
|
+
};
|
102
|
+
},
|
103
|
+
columns: [
|
104
|
+
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
105
|
+
{
|
106
|
+
title: this.$t1('邮件模板编码'),
|
107
|
+
field: 'notifyType',
|
108
|
+
width: 250,
|
109
|
+
fixed: 'left'
|
110
|
+
},
|
111
|
+
{
|
112
|
+
title: this.$t1('主题'),
|
113
|
+
field: 'ntName',
|
114
|
+
width: 150
|
115
|
+
},
|
116
|
+
{
|
117
|
+
title: this.$t1('是否启用'),
|
118
|
+
field: 'enabled',
|
119
|
+
width: 150,
|
120
|
+
slots: {
|
121
|
+
default: ({row}) => {
|
122
|
+
if (row.enabled) {
|
123
|
+
return [
|
124
|
+
<div class="txt-status">
|
125
|
+
<span>{this.$t1('启用')}</span>
|
126
|
+
</div>
|
127
|
+
];
|
128
|
+
} else {
|
129
|
+
return [
|
130
|
+
<div class="txt-status disable">
|
131
|
+
<span>{this.$t1('禁用')}</span>
|
132
|
+
</div>
|
133
|
+
];
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
},
|
138
|
+
{title: this.$t1('备注'), field: 'remark', width: 150},
|
139
|
+
{
|
140
|
+
title: this.$t1('创建时间'),
|
141
|
+
field: 'createDate',
|
142
|
+
width: 150
|
143
|
+
},
|
144
|
+
{
|
145
|
+
width: 47,
|
146
|
+
fixed: 'right',
|
147
|
+
title: '',
|
148
|
+
sortable: false,
|
149
|
+
slots: {
|
150
|
+
default: ({row}) => {
|
151
|
+
return [
|
152
|
+
<div>
|
153
|
+
<a
|
154
|
+
href="javascript:void(0);"
|
155
|
+
class="a-link"
|
156
|
+
onclick={() => {
|
157
|
+
this.openEditDialog(row.id);
|
158
|
+
}}
|
159
|
+
>
|
160
|
+
<el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
|
161
|
+
popper-class="tooltip-skin">
|
162
|
+
<i class="el-icon-edit"/>
|
163
|
+
</el-tooltip>
|
164
|
+
</a>
|
165
|
+
</div>
|
166
|
+
];
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
]
|
171
|
+
};
|
172
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
173
|
+
this.vxeOption = opts;
|
174
|
+
});
|
175
|
+
},
|
176
|
+
importExcel() {
|
177
|
+
let that = this;
|
178
|
+
that.$excelImport({
|
179
|
+
prefix: USER_PREFIX,
|
180
|
+
excel: USER_PREFIX + '/excelTemplate/notify_template/notifyTemplate.xlsx',
|
181
|
+
multi: false,
|
182
|
+
saveUrl: USER_PREFIX + '/notify_template/save',
|
183
|
+
callback: () => {
|
184
|
+
that.searchEvent();
|
185
|
+
}
|
186
|
+
});
|
187
|
+
}
|
188
|
+
}
|
189
|
+
};
|
190
|
+
</script>
|