cloud-web-corejs 1.0.54-dev.593 → 1.0.54-dev.594

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.
@@ -3,16 +3,41 @@
3
3
  <el-form ref="editForm" :model="formScript" :disabled="readonly">
4
4
  <div class="d-header clearfix">
5
5
  <div class="fl">
6
- <i class="el-icon-info"/>
7
- {{ dataId ? $t1('查看表单脚本') : $t1('新增表单脚本') }}
6
+ <i class="el-icon-info" />
7
+ {{ dataId ? $t1("查看表单脚本") : $t1("新增表单脚本") }}
8
8
  </div>
9
9
  <div class="fr">
10
10
  <el-form>
11
- <el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
12
- {{ $t1('重置') }}
11
+ <formVersionButton
12
+ v-if="!hData && formScript.id && !readonly"
13
+ objType="FormScript"
14
+ :objCode="formScript.scriptCode"
15
+ :relationCode="formScript.formCode"
16
+ @reverCallback="$baseReload()"
17
+ ></formVersionButton>
18
+ <reverButton
19
+ v-if="!!hData"
20
+ objType="FormScript"
21
+ :objCode="formScript.scriptCode"
22
+ :hData="hData"
23
+ @reverCallback="$emit('reverCallback')"
24
+ ></reverButton>
25
+ <el-button
26
+ type="primary"
27
+ plain
28
+ class="button-sty"
29
+ @click="$baseReload()"
30
+ icon="el-icon-refresh-right"
31
+ >
32
+ {{ $t1("重置") }}
13
33
  </el-button>
14
- <el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData"
15
- v-if="isDev && !readonly">{{ $t1('保存') }}
34
+ <el-button
35
+ type="primary"
36
+ class="button-sty"
37
+ icon="el-icon-check"
38
+ @click="saveData"
39
+ v-if="isDev && !readonly"
40
+ >{{ $t1("保存") }}
16
41
  </el-button>
17
42
  </el-form>
18
43
  </div>
@@ -22,77 +47,108 @@
22
47
  <template #default>
23
48
  <table class="table-detail">
24
49
  <tbody>
25
- <tr>
26
- <th>
27
- <em class="f-red">*</em>
28
- {{ $t1('脚本名称') }}
29
- </th>
30
- <td colspan="3">
31
- <el-form-item prop="scriptName" :rules="[{ required: true, trigger: 'blur' }]">
32
- <el-input type="text" autocomplete="off" v-model="formScript.scriptName" clearable/>
33
- </el-form-item>
34
- </td>
35
- <th>{{ $t1('脚本编码') }}</th>
36
- <td colspan="3">
37
- <el-form-item prop="scriptCode" :rules="[{ required: true, trigger: 'blur' }]">
38
- <el-input type="text" autocomplete="off" v-model="formScript.scriptCode" clearable/>
39
- </el-form-item>
40
- </td>
41
- </tr>
42
- <tr>
43
- <th>{{ $t1('是否启用') }}</th>
44
- <td>
45
- <el-form-item prop="enabled" :rules="[{ required: false, trigger: 'blur' }]">
46
- <el-radio-group v-model="formScript.enabled">
47
- <el-radio :label="true">{{ $t1('启用') }}</el-radio>
48
- <el-radio :label="false">{{ $t1('禁用') }}</el-radio>
50
+ <tr>
51
+ <th>
52
+ <em class="f-red">*</em>
53
+ {{ $t1("脚本名称") }}
54
+ </th>
55
+ <td colspan="3">
56
+ <el-form-item
57
+ prop="scriptName"
58
+ :rules="[{ required: true, trigger: 'blur' }]"
59
+ >
60
+ <el-input
61
+ type="text"
62
+ autocomplete="off"
63
+ v-model="formScript.scriptName"
64
+ clearable
65
+ />
66
+ </el-form-item>
67
+ </td>
68
+ <th>{{ $t1("脚本编码") }}</th>
69
+ <td colspan="3">
70
+ <el-form-item
71
+ prop="scriptCode"
72
+ :rules="[{ required: true, trigger: 'blur' }]"
73
+ >
74
+ <el-input
75
+ type="text"
76
+ autocomplete="off"
77
+ v-model="formScript.scriptCode"
78
+ clearable
79
+ />
80
+ </el-form-item>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>{{ $t1("是否启用") }}</th>
85
+ <td>
86
+ <el-form-item
87
+ prop="enabled"
88
+ :rules="[{ required: false, trigger: 'blur' }]"
89
+ >
90
+ <el-radio-group v-model="formScript.enabled">
91
+ <el-radio :label="true">{{ $t1("启用") }}</el-radio>
92
+ <el-radio :label="false">{{ $t1("禁用") }}</el-radio>
93
+ </el-radio-group>
94
+ </el-form-item>
95
+ </td>
96
+ <th>{{ $t1("开启事务") }}</th>
97
+ <td>
98
+ <el-radio-group v-model="formScript.transactions">
99
+ <el-radio :label="1">{{ $t1("是") }}</el-radio>
100
+ <el-radio :label="0">{{ $t1("否") }}</el-radio>
49
101
  </el-radio-group>
50
- </el-form-item>
51
- </td>
52
- <th>{{ $t1('开启事务') }}</th>
53
- <td>
54
- <el-radio-group v-model="formScript.transactions">
55
- <el-radio :label="1">{{ $t1('是') }}</el-radio>
56
- <el-radio :label="0">{{ $t1('否') }}</el-radio>
57
- </el-radio-group>
58
- </td>
59
- </tr>
60
- <tr>
61
- <th>{{ $t1('脚本说明') }}</th>
62
- <td colspan="7">
63
- <el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
64
- v-model="formScript.scriptRemark"
65
- clearable></el-input>
66
- </td>
67
- </tr>
68
- <tr>
69
- <th>
70
- <em class="f-red">*</em>
71
- {{ $t1('脚本') }}
72
- <!-- <scriptDescriptionButton path="static/readme/ApiRequest.txt"></scriptDescriptionButton>-->
73
- <scriptTestButton :script.sync="formScript.script"></scriptTestButton>
74
- </th>
75
- <td colspan="7">
76
- <el-form-item prop="script" :rules="[{ required: true, trigger: 'blur' }]">
77
- <code-editor mode="java" :readonly="readonly" v-model="formScript.script"
78
- v-if="showCodeEditor"></code-editor>
79
- </el-form-item>
80
- </td>
81
- </tr>
82
- <tr>
83
- <th>{{ $t1('唯一标识') }}</th>
84
- <td colspan="7">{{ formScript.sid }}</td>
85
- </tr>
86
- <tr>
87
- <th>{{ $t1('创建人') }}</th>
88
- <td>{{ formScript.createBy }}</td>
89
- <th>{{ $t1('创建时间') }}</th>
90
- <td>{{ formScript.createDate }}</td>
91
- <th>{{ $t1('更新人') }}</th>
92
- <td>{{ formScript.modifyBy }}</td>
93
- <th>{{ $t1('更新时间') }}</th>
94
- <td>{{ formScript.modifyDate }}</td>
95
- </tr>
102
+ </td>
103
+ </tr>
104
+ <tr>
105
+ <th>{{ $t1("脚本说明") }}</th>
106
+ <td colspan="7">
107
+ <el-input
108
+ type="textarea"
109
+ :rows="2"
110
+ :placeholder="$t1('请输入内容')"
111
+ size="small"
112
+ v-model="formScript.scriptRemark"
113
+ clearable
114
+ ></el-input>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <th>
119
+ <em class="f-red">*</em>
120
+ {{ $t1("脚本") }}
121
+ <!-- <scriptDescriptionButton path="static/readme/ApiRequest.txt"></scriptDescriptionButton>-->
122
+ <scriptTestButton :script.sync="formScript.script"></scriptTestButton>
123
+ </th>
124
+ <td colspan="7">
125
+ <el-form-item
126
+ prop="script"
127
+ :rules="[{ required: true, trigger: 'blur' }]"
128
+ >
129
+ <code-editor
130
+ mode="java"
131
+ :readonly="readonly"
132
+ v-model="formScript.script"
133
+ v-if="showCodeEditor"
134
+ ></code-editor>
135
+ </el-form-item>
136
+ </td>
137
+ </tr>
138
+ <tr>
139
+ <th>{{ $t1("唯一标识") }}</th>
140
+ <td colspan="7">{{ formScript.sid }}</td>
141
+ </tr>
142
+ <tr>
143
+ <th>{{ $t1("创建人") }}</th>
144
+ <td>{{ formScript.createBy }}</td>
145
+ <th>{{ $t1("创建时间") }}</th>
146
+ <td>{{ formScript.createDate }}</td>
147
+ <th>{{ $t1("更新人") }}</th>
148
+ <td>{{ formScript.modifyBy }}</td>
149
+ <th>{{ $t1("更新时间") }}</th>
150
+ <td>{{ formScript.modifyDate }}</td>
151
+ </tr>
96
152
  </tbody>
97
153
  </table>
98
154
  </template>
@@ -103,18 +159,28 @@
103
159
  </template>
104
160
  </baseTabPane>
105
161
  </baseTabs>
106
- <preformDialog v-if="showPreformDialog" :visiable.sync="showPreformDialog"
107
- :placeholder="formScript.transactions!==1?$t1('注:当前脚本未开启事务'):null"
108
- @confirm="confirmPreformDialog"></preformDialog>
162
+ <preformDialog
163
+ v-if="showPreformDialog"
164
+ :visiable.sync="showPreformDialog"
165
+ :placeholder="
166
+ formScript.transactions !== 1 ? $t1('注:当前脚本未开启事务') : null
167
+ "
168
+ @confirm="confirmPreformDialog"
169
+ ></preformDialog>
109
170
  </el-form>
110
171
  </div>
111
172
  </template>
112
173
 
113
174
  <script>
114
175
  import mixin from "./mixins/edit";
115
-
176
+ import formVersionButton from "@base/views/bd/setting/formVersion/button.vue";
177
+ import reverButton from "@base/views/bd/setting/formVersion/reverButton.vue";
116
178
  export default {
117
- name: 'user_form_scriptEdit',
118
- mixins: [mixin]
179
+ name: "user_form_scriptEdit",
180
+ mixins: [mixin],
181
+ components: {
182
+ formVersionButton,
183
+ reverButton,
184
+ },
119
185
  };
120
186
  </script>