centaline-data-driven 1.4.3 → 1.4.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/src/Form.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
4
- <ct-form :api="'/externalincomemanage/externalincomeimport/readDetail'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
4
+ <ct-form :api="'/PropertyContact/getLayoutOfNew'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
5
5
  <ct-dialog-list></ct-dialog-list>
6
6
  </div>
7
7
  </template>
@@ -11,21 +11,8 @@
11
11
  name: 'DataDrivenForm',
12
12
  data() {
13
13
  return {
14
- apiParam:{actionType
15
- :
16
- "3",
17
- originalTraId
18
- :
19
- "1572420664851103746",
20
- pageOnly
21
- :
22
- "true",
23
- pageStyle
24
- :
25
- "2",
26
- pageTitle
27
- :
28
- "修改成交单",
14
+ apiParam:{
15
+ chanceID: "1580430736434008064", actionType: 2
29
16
  },
30
17
  topHeight:10,
31
18
  }
@@ -221,6 +221,8 @@ const api = {
221
221
  self.$common.openDialog(dialogOption);
222
222
  }
223
223
  }
224
+ else if(data.rtnCode === Enum.ReturnCode.ConfirmAlert){
225
+ }
224
226
  else {
225
227
  if (response.data.rtnMsg && common.getDataDrivenOpts().showRequestErrorMessage) {
226
228
  if (data.MsgAlertStyle && data.MsgAlertStyle == Enum.MessageAlertStyle.Dialog) {
@@ -3,6 +3,7 @@
3
3
  <!--分片上传-->
4
4
  <template v-if="model.type==51">
5
5
  <el-upload :class="disableUpload ? 'ct-upload-display-none' : ''"
6
+ :http-request="SliceUpload"
6
7
  :disabled="model.lock"
7
8
  :accept="model.fileAccept"
8
9
  :on-change="handleChange"
@@ -27,7 +28,7 @@
27
28
  </div>
28
29
  <div slot="file" slot-scope="{ file }" :title="file.fileName">
29
30
  <div class="cover-list-item">
30
- <el-image fit="fill" :src="file.fileName?file.url:require('../../../assets/blank.png')" style="width: 100px; height: 100px" :z-index="previewZIndex" @click="viewerfile(file)">
31
+ <el-image fit="fill" :src="file.url?file.url:file.mediaUrl?file.mediaUrl+'/100/100':require('../../../assets/blank.png')" style="width: 100px; height: 100px" :z-index="previewZIndex" @click="viewerfile(file)">
31
32
  </el-image>
32
33
  <span class="cover-list-item-span-Default" v-if="model.rightDefault&&model.rightDefault==1&&file.mediaTypeID==2">
33
34
  <i>
@@ -69,7 +70,6 @@
69
70
  <!-- 官方上传 -->
70
71
  <template v-else>
71
72
  <el-upload :class="disableUpload ? 'ct-upload-display-none' : ''"
72
- :http-request="SliceUpload"
73
73
  :disabled="model.lock"
74
74
  :accept="model.fileAccept"
75
75
  :on-change="handleChange"
@@ -175,7 +175,6 @@
175
175
  },
176
176
  methods: {
177
177
  load(data) {
178
- debugger
179
178
  this.model = data;
180
179
  this.classifyClickHandle();
181
180
  if (this.model.action === '' && !this.model.lock) {
@@ -336,6 +336,25 @@
336
336
  if (self.parentModel) {
337
337
  self.parentModel.$vue.closeTabThen(data);
338
338
  }
339
+ }
340
+ else if (data.rtnCode === 202) {
341
+ self.$common.confirm(data.rtnMsg, '提示', {
342
+ confirmButtonText: '确定',
343
+ cancelButtonText: '取消',
344
+ type: 'warning'
345
+ }).then(() => {
346
+ field.doAction(self.getFormObj({flagHaveAlert:'1'}), (res) => {
347
+ if (res.rtnCode === 200) {
348
+ if(res.notification===17){
349
+ self.clickHandler(self.model.getRtnRouter(res.content),null)
350
+ }
351
+ else{
352
+ self.$emit('submit', { formData: self.model, responseData: res });
353
+ }
354
+ }
355
+ });
356
+ }).catch(() => {
357
+ });
339
358
  }
340
359
  },self.model.scripts);
341
360
  }
@@ -869,11 +888,14 @@
869
888
  }
870
889
  });
871
890
  },
872
- getFormObj(){
891
+ getFormObj(moreFormObj){
873
892
  let formData=this.model.getFormObj();
874
893
  if(this.$route && this.$route.query && this.$route.query.pageStyle){
875
894
  return Object.assign(formData,{'pageStyle':this.$route.query.pageStyle});
876
895
  }
896
+ if(moreFormObj){
897
+ return Object.assign(formData,moreFormObj);
898
+ }
877
899
  return formData;
878
900
  },
879
901
  getFileData(field) {
@@ -616,7 +616,7 @@ export default {
616
616
  var h2 = this.$refs.searchTable.offsetTop | 0;
617
617
  var h3 = this.$refs.toolbar.$el.offsetHeight | 0;
618
618
  var h4 = this.$refs.footer.$el.offsetHeight | 0;
619
- var h5 = this.$refs.listHeader ? (this.$refs.listHeader.$el.offsetHeight + 12) | 0 : 0;
619
+ var h5 = this.$refs.listHeader ? (this.$refs.listHeader.$el.offsetHeight + 8) | 0 : 0;
620
620
  var h6 = this.$refs.listFooter.$el.offsetHeight | 0;
621
621
  var h7 = this.$refs.tableStats ? (this.$refs.tableStats.$el.offsetHeight + 7) | 0 : 0;
622
622
  var h8 = this.$refs.popupButton ? this.$refs.popupButton.offsetHeight + 21 : 0;
@@ -973,8 +973,8 @@ export default {
973
973
  }
974
974
  else {
975
975
  if (field.action.indexOf("http://") === 0 || field.action.indexOf("https://") === 0) {
976
- var tempwindow=window.open('about:blank');
977
- tempwindow.location=field.action;
976
+ var tempwindow = window.open('about:blank');
977
+ tempwindow.location = field.action;
978
978
  // document.body.addEventListener('click', function() {
979
979
  // window.open(field.action, "_blank");
980
980
  // });
@@ -982,9 +982,9 @@ export default {
982
982
  else {
983
983
  field.doAction(submitData, (data) => {
984
984
  if (data.content) {
985
- if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
986
- var tempwindow=window.open('about:blank');
987
- tempwindow.location=data.content;
985
+ if (data.content.indexOf("http://") === 0 || data.content.indexOf("https://") === 0) {
986
+ var tempwindow = window.open('about:blank');
987
+ tempwindow.location = data.content;
988
988
  // document.body.addEventListener('click', function() {
989
989
  // window.open(data.content, "_blank");
990
990
  // });
@@ -1846,7 +1846,7 @@ export default {
1846
1846
  background-color: #fdf6ec;
1847
1847
  border-color: #faecd8;
1848
1848
  width: 100%;
1849
- box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
1850
- margin-bottom: 12px;
1849
+ box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
1850
+ margin-bottom: 8px;
1851
1851
  }
1852
1852
  </style>
@@ -4,7 +4,6 @@ async function postFile(api, data, callback) {
4
4
  xhr.open('POST', api)
5
5
  xhr.onreadystatechange = function () {
6
6
  if (xhr.readyState === 4 && xhr.status === 200) {
7
- console.log(xhr.responseText)
8
7
  var rtn = JSON.parse(xhr.responseText);
9
8
  callback(rtn);
10
9
  }
@@ -256,6 +256,7 @@ const Enum = {
256
256
  Successful: 200, //成功
257
257
  Error: 201, //失败
258
258
  Unauthorized: 401, //没有登录 或 登录超时
259
+ ConfirmAlert: 202, //确认提示
259
260
  },
260
261
 
261
262
  InsertPos: {
@@ -289,6 +289,7 @@ const LibFunction = {
289
289
  item.attrs.class = item.attrs.class + ' max-reset-btn ';
290
290
  break;
291
291
  case Enum.ControlType.File: //文件
292
+ case Enum.ControlType.SliceUpload: //文件
292
293
  var router = source.actionRouters.find((v1) => {
293
294
  return v1.key === field.fieldName1;
294
295
  });
package/src/main.js CHANGED
@@ -43,7 +43,7 @@ Vue.use(centaline, {
43
43
  getRequestHeaders: function () {
44
44
  return {
45
45
  oldToken: '854e91e2-3a5e-42af-a522-c51a0f5c09bc',
46
- token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrsOgkAQRf9laiZhYHaGpdMFGz-C7LJrgpXhkWiM_65G6Og9xSlOc-8TpiVADbqCO9ro7AruaKMjYqskLR6sOmThEityFToWx6emLd2xgQzS_QY1iagQWckzGPz8C6Yw5huWKY3n9PjHues8fGbJJuOrS0SKRY8cPGPQKBhTXirlXmMv8HoDAAD__w.gv5xV0ypbUsmam7QpRtTNsZhNoxbL3P4F2Rp2aYHb3Y',
46
+ token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEKg0AQRP9laxdcXXfv7OJpmnyEeGQFU4WokBDy7zFwdvZ5xSuGgZk3zGuEGjSBB9rpfQIPtNMTsVeSDk9eA7JwiY6Cw8AS-Nx2ZWhayMCed6hJRJ3Tgn0G07CkIM_dL1hne1zs9Y9zt2XaZn2lZcxpxGEsqq3sGH0sBiS6morZGMXg8wUAAP__.pRHigsL1V-LoAhchjSKQEXLI9EJv4RKjXEm6tliOaqk',
47
47
 
48
48
  originalRequestURL: 'http://10.88.22.67:8080',
49
49
  EstateInfo: '{"estateId":"FAF029E8-EC28-4297-83CF-B8FFD826DB91","estateName":"AABBCC"}',