centaline-data-driven 1.5.46 → 1.5.48

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.5.46",
3
+ "version": "1.5.48",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## v1.5.47
2
+ 2023-08-09
3
+
4
+ 优化
5
+
6
+ 表单列表列宽度自定义
7
+
8
+ 表单列表有滚动条操作按钮右侧固定
9
+
10
+ 表单列表添加 被冻结的列(固定在左边)
11
+
1
12
  ## v1.5.46
2
13
  2023-08-08
3
14
 
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="'/api/third-dept-tran/transaction/task'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
4
+ <ct-form :api="'/api/distribution/commission_presentiment/detail'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
5
5
  <ct-dialog-list></ct-dialog-list>
6
6
  </div>
7
7
  </template>
@@ -12,7 +12,7 @@
12
12
  data() {
13
13
  return {
14
14
  apiParam:{
15
- "stepId":"1686982560817586178","businessId":"1686982455918043138","actionType":1,"pageStyle":2,"pageOnly":true
15
+ "transactionId":["1661661776303677441","1667002679704797185"],"actionType":2,"pageStyle":2,"pageTitle":"新增预结","pageOnly":true
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -17,7 +17,7 @@
17
17
  <el-table size="mini" class="max-table--border" :data="model.tableData" :key="itemKey" border
18
18
  style="width: 100%" highlight-current-row :show-summary="model.showSummary" :summary-method="getSummaries">
19
19
  <!--数据列-->
20
- <el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" v-if="v.show !== false && v.type!==13" :render-header="renderHeader" :min-width="tableColumnWith">
20
+ <el-table-column v-for="(v,i) in model.rows[0].field" :key="i" :prop="v.id" :label="v.label" :width="v.width" :fixed="model.frozenColumns.includes(v.id)" v-if="v.show !== false && v.type!==13" :render-header="renderHeader" :min-width="tableColumnWith">
21
21
  <template slot="header" slot-scope="scope">
22
22
  <div :class="[{'ct-table-required':v.required&&model.rows[0].edit&& model.rows[0].delete&&!model.tableDisabled},getHeadClass(v)]">
23
23
  {{v.label}}
@@ -44,7 +44,7 @@
44
44
  </el-table-column>
45
45
 
46
46
  <!--操作列-->
47
- <el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :render-header="renderHeader" :min-width="tableColumnWith">
47
+ <el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :fixed="fixedButtons" :width="'100%'" :render-header="renderHeader" :min-width="tableColumnWith">
48
48
  <template slot-scope="scope">
49
49
  <span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
50
50
  {{scope.row.isSet?'保存':"修改"}}
@@ -167,10 +167,11 @@
167
167
  model: null,
168
168
  foucus: false,
169
169
  itemKey: Math.random(),
170
- tableColumnWith: 0
170
+ tableColumnWith: 0,
171
+ fixedButtons:false,
171
172
  }
172
173
  },
173
- created() {
174
+ created() {
174
175
  let self = this;
175
176
  this.model = this.vmodel;
176
177
  this.model.OptApi = this.api;
@@ -181,6 +182,17 @@
181
182
  self.model.refFieldsLabel = this.$refs.FieldsLabel;
182
183
  });
183
184
  },
185
+ mounted() {
186
+ this.$nextTick(function () {
187
+ let domT=document.querySelector('#listTable');
188
+ if(domT){
189
+ let domB=domT.querySelector('.el-table__body-wrapper');
190
+ if(domB && domB.scrollWidth>domB.offsetWidth){
191
+ this.fixedButtons='right';
192
+ }
193
+ }
194
+ });
195
+ },
184
196
  methods: {
185
197
  getHeadClass(v) {
186
198
  if (v.is === "ct-inputNumber") {
@@ -97,12 +97,16 @@
97
97
  getValue(data, val) {
98
98
  return val.split('.').reduce((data, currentVal) => {
99
99
  var rtn = data[currentVal];
100
- if (typeof rtn !== 'undefined' && typeof (rtn) == 'string') {
100
+ if (typeof rtn !== "undefined" && typeof rtn == "string") {
101
101
  rtn = rtn.replace(/"/g, "'");
102
+ rtn = rtn.replace(/&/g, "&amp;");
102
103
  rtn = rtn.replace(/>/g, "&gt;");
103
104
  rtn = rtn.replace(/</g, "&lt;");
104
- }
105
- else {
105
+ } else if (typeof rtn == "object") {
106
+ rtn = currentVal;
107
+ } else if (typeof rtn == "number") {
108
+ rtn = rtn;
109
+ } else {
106
110
  rtn = "";
107
111
  }
108
112
  return rtn
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div v-if="model.routerKey&&model.visibility!='0'&&model.rightRouter&&model.value!=''">
3
- <div class="wb" :style="model.styleObject">
2
+ <div v-if="model.routerKey&&model.visibility!='0'">
3
+ <div v-if="model.rightRouter&&model.value!=''" class="wb" :style="model.styleObject">
4
4
  <a href="javascript:void(0);" @click="clickHandler($event)" class="ct-tablecurrencyItem">
5
5
  {{model.value}}
6
6
  </a>
@@ -178,11 +178,13 @@ const Base = function (source) {
178
178
  set locked(v) {
179
179
  source.locked = v;
180
180
  },
181
+ get width() {
182
+ return source.width;
183
+ },
181
184
  get listBind() {
182
185
  let bind = {};
183
186
  bind = {
184
187
  style: {
185
- //width: 200 + 'px',
186
188
  'width': source.width + 'px',
187
189
  display: 'inline-table'
188
190
  }
@@ -75,7 +75,7 @@ const CellLayout = function (source, actionRouter,rowdata, forname, forrowindex)
75
75
  return b.id === source.routerKey;
76
76
  });
77
77
  if (typeof field !== "undefined") {
78
- if ((!field.rightField || (typeof rowdata[forname][forrowindex] !== "undefined" && rowdata[forname][forrowindex][field.rightField] == 1)) && field.show) {
78
+ if ((!field.rightField || (typeof rowdata[forname][forrowindex] !== "undefined" && (!rowdata[forname][forrowindex][field.rightField]||rowdata[forname][forrowindex][field.rightField] == 1)))) {
79
79
  forrightRouter = true;
80
80
  }
81
81
  }
@@ -718,6 +718,9 @@ const FormList = function (source, master) {
718
718
  get pageColumns() {
719
719
  return source.pageColumns || 1;
720
720
  },
721
+ get frozenColumns() {
722
+ return source.frozenColumns || [];
723
+ },
721
724
  };
722
725
  return rtn;
723
726
  };
package/src/main.js CHANGED
@@ -14,14 +14,14 @@ Vue.use(ElementUI, { size: 'mini'});
14
14
  // 关闭生产模式下给出的提示
15
15
  Vue.config.productionTip = false;
16
16
  Vue.use(centaline, {
17
- baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
17
+ // baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
18
18
  // baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
19
19
  // baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
20
20
  // baseUrl: "http://10.25.10.63:9999/service-api/v1/form/router",
21
21
  // baseUrl: "http://10.25.10.67:8080/",
22
22
  // baseUrl: "http://10.88.22.42:9999/service-api/v1/form/router",
23
23
  // baseUrl: "http://10.88.22.69:8080/api/",
24
- // baseUrl: "http://10.88.22.39:8080/",
24
+ baseUrl: "http://10.88.22.16:8080/",
25
25
  // baseUrl: "http://10.58.2.108:8080/",
26
26
  // baseUrl: "http://tjcptest.centaline.com.cn/",
27
27
  // baseUrl: "http://tjcpuat.centaline.com.cn:9090/",
@@ -56,7 +56,7 @@ Vue.use(centaline, {
56
56
  // 获取请求头
57
57
  getRequestHeaders: function () {
58
58
  return {
59
- oldToken: 'cd6060fd-36e5-47f1-8cb9-7fc6f61e645c',
59
+ oldToken: '681f7eeb-e659-4c3b-a8c4-88d60c36a518',
60
60
  token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQRO_iOiv5s1570zn-NBwiIuBIoUIkkUCIuxMEdPRMMRq95s1dzOsgWmHIccikIFr0gKQsMJYCURKxKdKYlHr-BH7UNz26yCFkByg7Aiw2A-tYwLDtEubgUibRiHo9i1aRRy-dtdSIab-8gdNKvcA618uu3v5x7rRMm3YkOZAfR6BtAWp_3LQHBNI8KHbkqlHi8QQAAP__.RrBgBqaFlp478oO3g5k_EEtjPt_o8qpJBkzgSP78Wa4',
61
61
  authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjrEOgjAURf-lMy9p6aPvlY2-wuJHkAIlwckIJBrjv6tRN3fPcIeznHtT6z6oWkVuNEpnQdqyAoxUQdMRQxBmHUqyGLj3H-DHfOmNQU_GtdB4EkCHFtgIg6AT7GJrJURVqHw5qdo4b5CRNBZqSdtbWM_2JfY1nw_5-o9zx215Zj2lZFEbGGbUgKUfIc2ZIdPoHI5I05TV_QEAAP__.JcB2iXcfHNcB2eJQ_kEIhID-UXCMx-HDoIuv9ZIA33I"}',
62
62