ap-dev 1.2.14 → 1.2.15

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.
@@ -360,8 +360,9 @@ export default {
360
360
  html: (value, row) => {
361
361
  return this.handleTemplateHtml(value);
362
362
  },
363
- help: `1、参数格式:\${xxxx}<br> xxx只能是字母,默认空格连接<br>
364
- 2、数组参数格式:\${xxxx#abc}<br>使用#连接,abc为自定义连接符。使用\\n表示换行<br>`
363
+ help: "1、参数格式:\${xxxx}<br> xxx只能是字母,默认空格连接<br>" +
364
+ "2、数组参数格式:\${xxxx#abc}<br>使用#连接,abc为自定义连接符。使用\\n表示换行<br>" +
365
+ "3、if判断:<br><#if>xxxx&lt/#if>"
365
366
  }, {
366
367
  prop: 'fdAddScriptId',
367
368
  label: '模板添加脚本',
@@ -866,7 +867,7 @@ export default {
866
867
  prop: 'fdName',
867
868
  label: '名称',
868
869
  type: 'input',
869
- width: 150,
870
+ width: 180,
870
871
  help: '参数- <br>显示- <br>显示事件- <br>显示方法-'
871
872
  }, {
872
873
  prop: 'fdCode',
@@ -878,7 +879,8 @@ export default {
878
879
  prop: 'fdScript',
879
880
  label: '脚本',
880
881
  type: 'input',
881
- help: 'js前段脚本。<br>示例:"\${InputSize.value}" != ""'
882
+ help: 'js执行脚本。<br><b>自带参数:</b>paramObj, paramTemplateObj' +
883
+ '<br><b>示例1-参数:</b>"\${InputSize.value}" != ""<br><b>示例2-自带参数:</b>paramTemplateObj.attrs.length>0'
882
884
  }, {
883
885
  prop: 'fdComment',
884
886
  label: '备注',
@@ -4,37 +4,66 @@
4
4
  <el-form
5
5
  ref="configFormRef"
6
6
  label-position="left"
7
- label-width="120px"
7
+ label-width="200px"
8
8
  :model="configForm"
9
9
  :inline-message="true">
10
10
  <el-form-item label="数据库" prop="fdSourceId">
11
11
  <el-select v-model="configForm.fdSourceId" placeholder="请选择数据库" filterable>
12
- <el-option v-for="item in dbSourceList"
13
- :key="item.fdId"
14
- :label="item.fdName"
15
- :value="item.fdId"/>
12
+ <el-option v-for="item in dbSourceList" :key="item.fdId" :label="item.fdName" :value="item.fdId"/>
16
13
  </el-select>
17
14
  </el-form-item>
18
15
 
19
- <el-form-item label="后端访问地址" prop="fdJavaHref">
20
- <el-input v-model="configForm.fdJavaHref" placeholder="http://本地ip:端口/项目名" class="item-width"/>
21
- <span class="item-msg">示例:http://172.22.0.147:8191/fa</span>
16
+ <el-form-item label="后端访问地址(请求代码生成)" prop="fdJavaHref">
17
+ <el-select v-model="configForm.fdJavaHref" class="item-width">
18
+ <template v-for="item in configHistoryList">
19
+ <el-option v-if="item.fdType == 1" :key="item.fdValue" :label="item.fdValue" :value="item.fdValue"></el-option>
20
+ </template>
21
+ </el-select>
22
+ <i class="el-icon-edit-outline edit-icon" @click="showHisTable(1)" />
22
23
  </el-form-item>
23
- <el-form-item label="后端项目路径" prop="fdJavaPath">
24
- <el-input v-model="configForm.fdJavaPath" placeholder="后端项目的根路径(后端代码生成位置)" class="item-width"/>
25
- <span class="item-msg">示例:E:\xxx\xxx\fa</span>
24
+ <el-form-item label="后端项目路径(生成文件)" prop="fdJavaPath">
25
+ <el-select v-model="configForm.fdJavaPath" class="item-width">
26
+ <template v-for="item in configHistoryList">
27
+ <el-option v-if="item.fdType == 2" :key="item.fdValue" :label="item.fdValue" :value="item.fdValue"></el-option>
28
+ </template>
29
+ </el-select>
30
+ <i class="el-icon-edit-outline edit-icon" @click="showHisTable(2)" />
26
31
  </el-form-item>
27
- <el-form-item label="前端访问地址" prop="fdVueHref">
28
- <el-input v-model="configForm.fdVueHref" placeholder="http://本地ip:端口/#/" class="item-width"/>
29
- <span class="item-msg">示例:http://172.22.0.252:9527/#/</span>
32
+ <el-form-item label="前端访问地址(预览)" prop="fdVueHref">
33
+ <el-select v-model="configForm.fdVueHref" class="item-width">
34
+ <template v-for="item in configHistoryList">
35
+ <el-option v-if="item.fdType == 3" :key="item.fdValue" :label="item.fdValue" :value="item.fdValue"></el-option>
36
+ </template>
37
+ </el-select>
38
+ <i class="el-icon-edit-outline edit-icon" @click="showHisTable(3)" />
30
39
  </el-form-item>
31
- <el-form-item label="前端项目路径" prop="fdVuePath">
32
- <el-input v-model="configForm.fdVuePath" placeholder="前端项目的根路径(前端代码生成位置)" class="item-width"/>
33
- <span class="item-msg">示例:E:\xxx\xxx\ap</span>
40
+ <el-form-item label="前端项目路径(生成文件)" prop="fdVuePath">
41
+ <el-select v-model="configForm.fdVuePath" class="item-width">
42
+ <template v-for="item in configHistoryList">
43
+ <el-option v-if="item.fdType == 4" :key="item.fdValue" :label="item.fdValue" :value="item.fdValue"></el-option>
44
+ </template>
45
+ </el-select>
46
+ <i class="el-icon-edit-outline edit-icon" @click="showHisTable(4)" />
34
47
  </el-form-item>
35
48
  </el-form>
36
49
  <el-button type="primary" @click="saveConfigForm">保 存</el-button>
37
50
  </ap-main>
51
+
52
+ <el-dialog
53
+ :title="dialogTitle"
54
+ :visible.sync="dialogVisible"
55
+ :close-on-click-modal="false"
56
+ @close="dialogCloseEvent"
57
+ width="50%">
58
+ <div style="color: red;font-weight: bold;margin-bottom: 5px" v-html="msg">
59
+ </div>
60
+ <div style="height: 300px;width: 100%">
61
+ <ap-table ref="tDevUserConfigHistoryRef" :options.sync="tDevUserConfigHistoryOpt"></ap-table>
62
+ </div>
63
+ <span slot="footer" class="dialog-footer">
64
+ <el-button @click="dialogVisible = false">取 消</el-button>
65
+ </span>
66
+ </el-dialog>
38
67
  </ap-container>
39
68
  </template>
40
69
 
@@ -45,11 +74,43 @@ export default {
45
74
  created() {
46
75
  this.initDbSource();
47
76
  this.initConfig();
77
+ this.initConfigHistory();
48
78
  },
49
79
  data() {
80
+ let columns = [
81
+ {
82
+ prop: 'fdValue',
83
+ label: '值',
84
+ type: 'input'
85
+ },
86
+ ];
87
+ let tableOpt = {
88
+ title: "用户配置信息",
89
+ columns: columns,
90
+ editPk: "fdId", //默认fdId
91
+ deletePk: "fdId", // 默认fdId
92
+ dataUrl: "/apd/TDevUserConfigHistory/getTDevUserConfigHistoryGridList",
93
+ saveUrl: "/apd/TDevUserConfigHistory/saveTDevUserConfigHistoryGridData",
94
+ deleteUrl: "/apd/TDevUserConfigHistory/deleteTDevUserConfigHistoryGridData",
95
+ toolbarBtn: ["add", "edit", "del", "cancel", "refresh", "save"],
96
+ addDefaultObj: () => {
97
+ return { fdType: this.editType}
98
+ },
99
+ params: () => {
100
+ return {
101
+ fdType: this.editType
102
+ }
103
+ }
104
+ };
50
105
  return {
51
106
  dbSourceList: [],
107
+ configHistoryList: [],
52
108
  configForm: {},
109
+ editType: "",
110
+ dialogVisible: false,
111
+ msg: "",
112
+ dialogTitle: "配置",
113
+ tDevUserConfigHistoryOpt: tableOpt,
53
114
  }
54
115
  },
55
116
  methods: {
@@ -70,6 +131,43 @@ export default {
70
131
  this.configForm = response.data;
71
132
  })
72
133
  },
134
+ initConfigHistory() {
135
+ this.$request({
136
+ url: '/apd/TDevUserConfigHistory/getTDevUserConfigHistoryList',
137
+ method: 'post',
138
+ data: {}
139
+ }).then(response => {
140
+ this.configHistoryList = response.data;
141
+ })
142
+ },
143
+ showHisTable(type) {
144
+ this.dialogVisible = true;
145
+ this.editType = type;
146
+ switch (type) {
147
+ case 1:
148
+ this.msg = "配置说明: http://本地ip:端口/项目名 → http://172.22.0.123:8191/pm";
149
+ this.dialogTitle = "后端访问地址(请求代码生成)";
150
+ break;
151
+ case 2:
152
+ this.msg = '配置说明: 后端项目本地根路径 → E:\\xxx\\xxx\\pm';
153
+ this.dialogTitle = "后端项目路径(生成文件)";
154
+ break;
155
+ case 3:
156
+ this.msg = '配置说明: http://本地ip:端口/#/ → http://172.22.0.123:9527/#/';
157
+ this.dialogTitle = "前端访问地址(预览)";
158
+ break;
159
+ case 4:
160
+ this.msg = '配置说明: 前端项目本地根路径 → E:\\xxx\\xxx\\ap';
161
+ this.dialogTitle = "前端项目路径(生成文件)";
162
+ break;
163
+ }
164
+ this.$nextTick(() => {
165
+ this.$refs.tDevUserConfigHistoryRef.refresh();
166
+ })
167
+ },
168
+ dialogCloseEvent() {
169
+ this.initConfigHistory()
170
+ },
73
171
  saveConfigForm() {
74
172
  let param = this.configForm;
75
173
  this.$request({
@@ -99,4 +197,9 @@ export default {
99
197
  color: #9e9e9e;
100
198
  margin-left: 10px;
101
199
  }
200
+ .edit-icon {
201
+ font-size: 19px;
202
+ margin-left: 10px;
203
+ color: #1682e6;
204
+ }
102
205
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ap-dev",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "===== ap-dev =====",
5
5
  "author": "xiexinbin",
6
6
  "email": "876818817@qq.com",