centaline-data-driven 1.5.95 → 1.5.97

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.
@@ -65,6 +65,8 @@ const paths = {
65
65
  "dynamicCalendar": "./src/centaline/dynamicCalendar/index.js", //日历控件
66
66
  "dynamicLH": "./src/centaline/dynamicLH/index.js", //html 标签
67
67
  "dynamicImage": "./src/centaline/dynamicImage/index.js", //图片
68
+ "dynamicAppContainer": "./src/centaline/dynamicAppContainer/index.js", //
69
+
68
70
  },
69
71
  "plugs": {
70
72
  "api": "./src/centaline/api/index.js", //调用API插件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.5.95",
3
+ "version": "1.5.97",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,22 @@
1
+ # v1.5.97
2
+ 2024-01-29
3
+ 新增
4
+
5
+ 容器布局组件 appContainer
6
+
7
+ 优化
8
+
9
+ 列表组件增加重新加载方法
10
+
11
+ 单选框点击文字选中时,没有触发change事件
12
+
13
+ # v1.5.96
14
+ 2024-01-22
15
+ 优化
16
+
17
+ 日历控件只显示当前月天
18
+
19
+
1
20
  # v1.5.95
2
21
  2024-01-11
3
22
  优化
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="'/Worklist/getLayoutOfMyApply'" :apiParam="apiParam" :topHeight="topHeight"></ct-form>
4
+ <ct-form :api="'/necessaryfile/ContractConfirmImport/getContractConfirmImportForm'" :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
- "instanceID":"1735136386186612736","actionType":3
15
+
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -0,0 +1,13 @@
1
+ import dynamicAppContainer from './src/dynamicAppContainer'
2
+ import api from '../api/index'
3
+
4
+ dynamicAppContainer.install = function (Vue) {
5
+ Vue.component(dynamicAppContainer.name, dynamicAppContainer);
6
+ Vue.use(api);
7
+ }
8
+
9
+ if (typeof window !== 'undefined' && window.Vue) {
10
+ window.Vue.use(dynamicAppContainer);
11
+ }
12
+
13
+ export default dynamicAppContainer;
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <div class="common-layout" v-loading="loading">
3
+
4
+ <appContainerLayout :apps="model.apps" :layouts="model.layouts" v-if="model !== null && !loading" :firstLoad="true"></appContainerLayout>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ import appContainerLayout from "./dynamicAppContainerLayout.vue";
10
+ import dynamicElement from '../../mixins/dynamicElement'
11
+
12
+ export default {
13
+ name: 'ct-appContainer',
14
+ mixins: [dynamicElement],
15
+ components: {
16
+ "appContainerLayout": appContainerLayout,
17
+ },
18
+ props: {
19
+ api: String,
20
+ vmodel: Object,
21
+ source: Object,
22
+ apiParam: Object,
23
+ },
24
+ data() {
25
+ return {
26
+ loading: true
27
+ }
28
+ },
29
+ methods: {
30
+ init() {
31
+ var self = this;
32
+ //初始化
33
+ this.loading = true;
34
+ this.$nextTick(function () {
35
+ if (typeof self.source !== 'undefined') {
36
+ self.load(self.loaderObj.AppContainer(self.source));
37
+ }
38
+ else if (typeof self.api !== 'undefined') {
39
+ self.loaderObj.AppContainer(self.api, this.apiParam, self.load);
40
+ }
41
+ else if (self.vmodel) {
42
+ self.load(self.vmodel);
43
+ }
44
+ });
45
+ },
46
+ load(data) {
47
+ this.model = data;
48
+ this.model.self = this;
49
+ this.loading = false;
50
+ },
51
+ },
52
+ mounted() {
53
+ this.init();
54
+ },
55
+ }
56
+ </script>
57
+ <style>
58
+ body {
59
+ height: 100%;
60
+ overflow: hidden;
61
+ background: #ddd;
62
+ }
63
+
64
+ html {
65
+ height: 100%;
66
+ }
67
+ </style>
@@ -0,0 +1,136 @@
1
+ <template>
2
+ <div style="width: 100%;" :class="{ 'isFlex': isFlex }">
3
+ <template v-for="(item, index) in layouts" style="width: 100%;">
4
+ <component :is="'el'+item.containerLayoutType" :width="item.width"
5
+ :style="{ width: item.width, height: item.height, 'margin-top': !firstLoad && item.containerLayoutType == 'Container' ? '0px' : '', 'padding-bottom': '5px' }"
6
+ :height="item.height">
7
+ <template v-if="item.appID">
8
+ <template v-for="(app) in getAppParm(item.appID)">
9
+ <template v-if="app.relationAppID == '' || (app.relationAppID != '' &&
10
+ JSON.stringify(apiParam) != '{}')">
11
+ <component :is="'ct-'+app.appType" :searchConditionApi="app.searchConditionAction"
12
+ :appID="app.appID" :ref="'ref' + app.appID" :key="index"
13
+ :searchDataApi="app.searchDataAction" @rowClickHandle="rowClickHandle" :apiParam="apiParam"
14
+ :style="{ 'padding-left': index > 0 ? '10px' : '' }" :from="'hasTop'">
15
+ </component>
16
+ <!-- <ct-searchlist :searchConditionApi="app.searchConditionAction" :appID="item.appID"
17
+ :ref="'ref' + item.appID" :key="index" :searchDataApi="app.searchDataAction"
18
+ @rowClickHandle="rowClickHandle" :apiParam="apiParam"></ct-searchlist> -->
19
+ </template>
20
+ </template>
21
+ </template>
22
+
23
+ <dynamicAppContainerLayout v-if="item.layouts && item.layouts.length > 0" :layouts="item.layouts"
24
+ :apps="apps" :apiParam="screenPara" :parentAppID="appID" :firstLoad="false" />
25
+ </component>
26
+
27
+ </template>
28
+
29
+ </div>
30
+ </template>
31
+ <script>
32
+ import dynamicSearchList from "../../dynamicSearchList/src/dynamicSearchList";
33
+ import dynamicCalendar from "../../dynamicCalendar/src/dynamicCalendar";
34
+
35
+ export default {
36
+ name: 'dynamicAppContainerLayout',
37
+ components: {
38
+ "ct-Calendar": dynamicCalendar,
39
+ "ct-Search": dynamicSearchList,
40
+ },
41
+ props: {
42
+ layouts: {
43
+ type: Array,
44
+ default: () => [],
45
+ },
46
+ apps: {
47
+ type: Array,
48
+ default: () => { },
49
+ },
50
+ apiParam: {
51
+ type: Object,
52
+ default: () => { },
53
+ },
54
+ parentAppID: {
55
+ type: String,
56
+ default: "",
57
+ },
58
+ firstLoad: {
59
+ type: Boolean,
60
+ default: true,
61
+ },
62
+ },
63
+ data() {
64
+ return {
65
+ screenPara: {},
66
+ appID: "",
67
+ appIDs: {}
68
+ }
69
+ },
70
+ computed: {
71
+ isFlex() {
72
+ return this.layouts.some(n => {
73
+ return n.containerLayoutType == "Aside"
74
+ })
75
+
76
+ },
77
+
78
+ },
79
+ created() {
80
+ },
81
+ mounted() {
82
+ },
83
+ methods: {
84
+ getAppParm(appID) {
85
+ let item = this.apps.filter((v) => {
86
+ return v.appID === appID
87
+ });
88
+ this.appIDs[appID] = appID
89
+ return item;
90
+ },
91
+ rowClickHandle(data, appID) {
92
+ this.appID = appID;
93
+ this.screenPara = data;
94
+ },
95
+ },
96
+ watch: {
97
+ //监听父级传过来的的数据
98
+ apiParam: function (newVal, oldVal) {
99
+ let self = this;
100
+ self.$nextTick(() => {
101
+ //循环同级组件,相同父级关联ID重新调用查询
102
+ for (let appID in self.appIDs) {
103
+
104
+ let index = self.apps.findIndex((v) => {
105
+ return v.appID === appID
106
+ });
107
+ let item = self.apps[index];
108
+ if (!(item && item.relationAppID)) {
109
+ return;
110
+ }
111
+ else if (item && (self.parentAppID && item.relationAppID == self.parentAppID)) {
112
+ if (self.apiParam && JSON.stringify(self.apiParam) != '{}') {
113
+ if (self.$refs['ref' + appID][0].reload)
114
+ self.$refs['ref' + appID][0].reload(self.apiParam)
115
+ }
116
+ }
117
+
118
+ }
119
+
120
+ })
121
+ },
122
+ },
123
+ }
124
+ </script>
125
+ <style scoped>
126
+ .isFlex {
127
+ display: flex;
128
+ flex-direction: row;
129
+ flex-wrap: wrap;
130
+ }
131
+
132
+ .el-header,
133
+ .el-main {
134
+ padding: 0px;
135
+ }
136
+ </style>
@@ -42,7 +42,7 @@
42
42
  <section
43
43
  v-for="(item, index) in getDayData(value.day)"
44
44
  :key="index"
45
- v-if="model.columns"
45
+ v-if="value.isCurrentMonth&&model.columns"
46
46
  >
47
47
  <div v-for="(col, index) in model.columns" :key="index">
48
48
  <div v-if="col.fieldName != 'operation'">
@@ -7,7 +7,7 @@
7
7
  </div>
8
8
  <div class="ct-radios">
9
9
  <el-checkbox v-model="model.value" :disabled="model.lock" @change="changeCheckBoxHandler"></el-checkbox>
10
- <span v-show="model.sufLabel1" style="margin-left:1px;color: #767A81;">{{ model.sufLabel1 }}</span>
10
+ <span v-show="model.sufLabel1" style="margin-left:1px;color: #767A81;">{{ model.sufLabel1 }}</span>
11
11
  </div>
12
12
  </div>
13
13
  <transition name="el-fade-in">
@@ -56,8 +56,9 @@
56
56
  }
57
57
  },
58
58
  toggleCheckbox() {
59
- this.model.value = !this.model.value;
60
- },
59
+ this.model.value = !this.model.value;
60
+ this.changeCheckBoxHandler();
61
+ },
61
62
  changeCheckBoxHandler: function (event) {
62
63
  this.changeHandler();
63
64
  if(this.model.autoSearch) this.$emit('click');
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div ref="main" style="width: 100%;height: 100%;display: flex;" :class="{'domDisabled':pageDisabled}">
2
+ <div ref="main" style="width: 100%;height: 100%;display: flex;" :class="{'domDisabled':pageDisabled}" v-if="flagShow">
3
3
  <div class="ct-search-list" :style="{'height': pageHeightReal? pageHeightReal:'100%','width':searchWidth?searchWidth+'px':'100%'}" >
4
4
  <div slot="header" class="clearfix" v-if="typeof title !== 'undefined' && showTitle">
5
5
  <span style="font-weight:bold">{{title}}</span>
@@ -7,7 +7,7 @@
7
7
  <ct-searchcategory v-if="searchCategoryApi" ref="category" :api="searchCategoryApi" @loadedCategory="categoryLoaded"
8
8
  @loadedCategoryError="categoryLoadedError" @changeCategory="categorychange" ></ct-searchcategory>
9
9
 
10
- <ct-searchscreen ref="screen" :api="searchConditionApi" :key="reloadKeyScreen"
10
+ <ct-searchscreen ref="screen" :api="searchConditionApi" :key="reloadKeyScreen"
11
11
  @loaded="screenLoaded" :screenPara="screenPara" @resetSearch="resetSearch()"
12
12
  :categoryLoaded="loaded.categoryLoaded" @search="search()" @saveShortcut="saveShortcut"
13
13
  @showTitle="showTitleScreenHandler"></ct-searchscreen>
@@ -51,7 +51,8 @@
51
51
  'ct-SearchSideMenu': dynamicSearchSideMenu,
52
52
  'ct-Detail': ()=>import('../../dynamicDetail/src/dynamicDetail.vue'),
53
53
  },
54
- props: {
54
+ props: {
55
+ appID:String,
55
56
  vmodel: Object,
56
57
  searchCategoryApi: String,
57
58
  searchConditionApi: String,
@@ -122,6 +123,7 @@
122
123
  drowerClose:'',
123
124
  listHeight:0,
124
125
  pageHeightReal: '',
126
+ flagShow: true
125
127
 
126
128
  }
127
129
  },
@@ -189,13 +191,23 @@
189
191
  this.reloadKeyScreen='s'+this.reloadKey;
190
192
  this.reloadKeyTable='t'+this.reloadKey;
191
193
  },
194
+
195
+ reload() {
196
+ this.screenPara=this.apiParam;
197
+ let self = this;
198
+ this.flagShow = false;
199
+ self.$nextTick(() => {
200
+ this.flagShow = true;
201
+ })
202
+ },
192
203
  search() {
204
+
193
205
  this.selectIndex=-1;
194
206
  if (this.$refs.table.model) {
195
207
  this.pageDisabled=true;
196
208
  this.$refs.table.getPage(1);
197
209
  }
198
- else {
210
+ else {
199
211
  this.$refs.table.searchComplate(this.$refs.screen.model,this.$refs.screen.model.defaultSearch);
200
212
  }
201
213
  },
@@ -358,7 +370,7 @@
358
370
  },
359
371
  rowClickHandle() {
360
372
  var self = this;
361
- if ( self.selectIndex !== self.$refs.table.model.selectIndex && self.$refs.table.model.rowSelectRouter) {
373
+ if (self.selectIndex !== self.$refs.table.model.selectIndex && self.$refs.table.model.rowSelectRouter) {
362
374
  self.selectIndex = self.$refs.table.model.selectIndex;
363
375
  self.rowCount = self.$refs.table.model.listData.length;
364
376
  if (this.sideBarStatus && this.sideBarStatus == "open") {
@@ -375,15 +387,15 @@
375
387
  }
376
388
  try {
377
389
  let ApiParam = {};
378
- if (self.$refs.table.model.rowSelectRouter.submitListField) {
390
+ if (self.$refs.table.model.rowSelectRouter.submitListField&&self.$refs.table.model.listData.length>0) {
379
391
  self.$refs.table.model.rowSelectRouter.submitListField.forEach((k) => {
392
+
380
393
  ApiParam[k] = self.$refs.table.model.listData[self.selectIndex][k];
381
394
  });
382
395
  }
383
-
384
- this.$emit("rowClickHandle",ApiParam);
385
- }
386
- catch (e) {}
396
+ this.$emit("rowClickHandle", ApiParam, self.appID);
397
+ }
398
+ catch (e) { }
387
399
  }
388
400
  },
389
401
  refreshRowHandle(){