centaline-data-driven 1.2.20 → 1.2.21

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.2.20",
3
+ "version": "1.2.21",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
Binary file
Binary file
Binary file
@@ -47,6 +47,7 @@
47
47
  height: 26px;
48
48
  background: #EE6B6B;
49
49
  border-color:#EE6B6B;
50
+ width: 85px;
50
51
  box-shadow: 0px 2px 4px 0px rgba(238,107,107,0.25);
51
52
  border-radius: 6px;
52
53
  }
@@ -3,8 +3,8 @@
3
3
  <div class="list-title">
4
4
  <h5>{{model.title}}</h5>
5
5
  </div>
6
- <div class="list-button max-btn-add">
7
- <el-button v-if="model.create" type="success" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
6
+ <div class="list-button">
7
+ <el-button v-if="model.create" type="success" class=" max-btn-add" size="mini" icon="el-icon-circle-plus-outline" @click="addRow">
8
8
  新增
9
9
  </el-button>
10
10
  </div>
@@ -349,7 +349,6 @@
349
349
  .ct-form-list .list-button {
350
350
  padding-bottom: 5px;
351
351
  text-align: right;
352
- width: 45%;
353
352
  display: inline-table;
354
353
  float: right;
355
354
  }
@@ -14,7 +14,7 @@
14
14
  <div class="cover-list-item">
15
15
  <el-image
16
16
  fit="fill"
17
- :src="item.mediaUrl"
17
+ :src="item.thumbnailUrl"
18
18
  style="width: 100px; height: 100px"
19
19
  :z-index="previewZIndex"
20
20
  @click="viewerOpen(photoList, index)"
@@ -138,8 +138,8 @@ export default {
138
138
  Selected: chooseList,
139
139
  // width: self.modelPhotoselect.router.pageWidth + 'px',
140
140
  // height: self.modelPhotoselect.router.pageHeight+'px',
141
- width: "1024px",
142
- height: "600px",
141
+ width: "772px",
142
+ height: "550px",
143
143
  para: params,
144
144
  },
145
145
  on: {
@@ -1,55 +1,43 @@
1
1
  <template>
2
- <div style="width:100%" class="ct-photoSelectList" v-if="FlagPhoto">
3
- <el-main style="position:absolute; top:60px;bottom:60PX;left:0;right:0;">
4
- <el-row :gutter="10">
5
- <el-col :span="24"
6
- :lg="4"
7
- :md="7"
8
- :sm="9"
9
- v-for="(item, index) in imageList"
10
- :key="index">
11
- <el-card class="box-card mb-3 position-relative" :class="{'border-danger': item.ischeck }"
12
- :body-style="{ padding: '0' }"
13
- shadow="hover"
14
- style="cursor:pointer;">
15
- <div class="border ">
16
- <img :src="item.mediaUrl"
17
- alt=""
18
- class="w-100"
19
- style="height:100px;" />
20
- <div class="w-100 text-white px-1"
21
- style="background:rgba(0,0,0,0.5);margin-top:-25px; position:absolute">
22
- <span class="small">{{item.mediaLabelName }}</span>
23
- </div>
24
- <div class="p-2 text-center">
25
- <el-button-group>
26
- <el-button icon="el-icon-view"
27
- size="mini"
28
- class="p-2"
29
- @click="viewerOpen(imageList,index)"></el-button>
30
- <el-button icon="el-icon-shopping-cart-2"
31
- size="mini"
32
- class="p-2"
33
- @click="choose(item)"></el-button>
34
- </el-button-group>
35
- <span class="badge badge-danger"
36
- style="position:absolute;right:0;top:0;"
37
- v-if="item.ischeck"></span>
38
- <!-- <el-tag type="danger" effect="dark" size="mini" >1</el-tag> -->
39
- </div>
40
- </div>
41
- </el-card>
42
- </el-col>
43
- </el-row>
44
- </el-main>
2
+ <div style=" width: 100%;height: 100%;position: relative;
3
+ " class="ct-photoSelectList" v-if="FlagPhoto">
4
+ <el-main style="position: absolute;
5
+ top: 10px;
6
+ bottom: 70PX;
7
+ left: 10px;
8
+ right: 0;
9
+ padding:0px">
10
+ <ul class="el-upload-list el-upload-list--picture-card">
11
+ <li class="el-upload-list__item is-success" :class="{'border-danger': item.ischeck}"
12
+ v-bind:key="index"
13
+ v-for="(item, index) in imageList">
14
+ <div class="cover-list-item">
15
+ <el-image fit="fill"
16
+ :src="item.thumbnailUrl"
17
+ style="width: 100px; height: 100px"
18
+ :z-index="previewZIndex"
19
+ @click="viewerOpen(imageList, index)">
20
+ </el-image>
21
+ <span class="cover-list-item-span" v-if="item.mediaLabelName">
22
+ <span class="el-dropdown-link">
23
+ &nbsp;{{ item.mediaLabelName }}
24
+ </span>
25
+ </span>
26
+ <div class="p-2 text-center">
27
+ <i class="max-view" @click="viewerOpen(imageList,index)"></i>
28
+ <i class="max-success" @click="choose(item)" :class="{'ischeck': item.ischeck }"></i>
45
29
 
30
+ <!-- <el-tag type="danger" effect="dark" size="mini" >1</el-tag> -->
31
+ </div>
32
+ </div>
33
+ </li>
34
+ </ul>
46
35
 
47
- <el-row :gutter="10" t>
48
- <el-col :span="24" :lg="4" :md="6" :sm="8">
49
- <el-button type="primary" @click="handleClick()">选择</el-button>
50
- </el-col>
51
- </el-row>
36
+ </el-main>
52
37
 
38
+ <div style="width:100%;text-align:center">
39
+ <el-button type="primary" style="position:absolute;bottom:30px;" @click="handleClick()">选择</el-button>
40
+ </div>
53
41
  <ct-viewer ref="photoSelectListViewer" />
54
42
 
55
43
  </div>
@@ -148,7 +136,11 @@
148
136
  item.ischeck = false;
149
137
  },
150
138
  handleClick() {
151
- this.$emit('handlePhoto', this.chooseList);
139
+ if (this.chooseList && this.chooseList.length > 0) {
140
+ this.$emit('handlePhoto', this.chooseList);
141
+ } else {
142
+ self.$message.warning("请选择至少一张图片");
143
+ }
152
144
 
153
145
  },
154
146
  viewerOpen(list, index) {
@@ -165,6 +157,116 @@
165
157
  </script>
166
158
  <style>
167
159
  .border-danger {
168
- border: 1px solid red;
160
+ border: 1px solid red !important;
161
+ }
162
+ .ct-photoSelectList .cover-list-item-span {
163
+ position: inherit;
164
+ bottom: 0px;
165
+ display: block;
166
+ background-color: #544f48;
167
+ opacity: 0.8;
168
+ text-align: left
169
+ }
170
+ .ct-photoSelectList .el-dropdown-link {
171
+ color: #fff;
172
+ margin-left:5px
173
+ }
174
+ .text-center {
175
+ position: absolute;
176
+ top: 0;
177
+ right: 5px;
178
+ }
179
+ .max-view {
180
+ background: url(../../../assets/ck.png);
181
+ background-size: 100% 100%;
182
+ width: 24px;
183
+ height: 24px;
184
+ display: inline-block;
185
+ }
186
+ .max-success {
187
+ background: url(../../../assets/succe.png);
188
+ background-size: 100% 100%;
189
+ width: 24px;
190
+ height: 24px;
191
+ display: inline-block;
192
+ }
193
+ .ischeck {
194
+ background: url(../../../assets/success.png);
195
+ background-size: 100% 100%;
196
+ }
197
+
198
+
199
+ .ct-upload-display-none .el-upload--picture-card {
200
+ display: none;
201
+ }
202
+
203
+ .el-upload-list__item .is-ready {
204
+ width: 100px;
205
+ height: 100px;
206
+ }
207
+
208
+ .ct-photoSelectList .cover-list-item {
209
+ position: sticky;
210
+ }
211
+
212
+ .ct-photoSelectList .cover-list-item-span {
213
+ position: inherit;
214
+ bottom: 0px;
215
+ left: 0px;
216
+ display: block;
217
+ background-color: #544f48;
218
+ opacity: 0.8;
219
+ }
220
+
221
+ .ct-photoSelectList .cover-list-item-span-delete {
222
+ position: inherit;
223
+ bottom: 160px;
224
+ left: 130px;
225
+ color: #000000;
226
+ text-align: center;
227
+ }
228
+
229
+ .cover-list-item-span-delete i {
230
+ cursor: pointer;
231
+ vertical-align: sub;
232
+ margin-right: 4px;
233
+ }
234
+
235
+ .ct-photoSelectList .el-dropdown-link {
236
+ cursor: pointer;
237
+ color: #fff;
169
238
  }
239
+
240
+ .ct-photoSelectList .el-icon-arrow-down {
241
+ font-size: 12px;
242
+ }
243
+
244
+ .el-collapse-item__content {
245
+ padding-bottom: 18px;
246
+ }
247
+
248
+ .el-upload--picture-card {
249
+ width: 100px;
250
+ height: 100px;
251
+ line-height: initial;
252
+ padding: 34px;
253
+ }
254
+
255
+ .el-upload--picture-card i {
256
+ font-size: 30px;
257
+ }
258
+
259
+ .el-upload-list--picture-card .el-upload-list__item {
260
+ width: 100px;
261
+ height: 100px;
262
+ }
263
+
264
+ .card {
265
+ display: inline-block;
266
+ }
267
+ .ct-photoSelectList .icon{
268
+ cursor: pointer;
269
+ font-size: 20px;
270
+ }
271
+
170
272
  </style>
@@ -725,7 +725,7 @@
725
725
  self.$forceUpdate();
726
726
  self.$refs.footer.$forceUpdate();
727
727
  self.$common.closeDialog(dialogOption.dialog);
728
- self.updateCurrentRow(field);
728
+ self.updateCurrentRow(field,ev);
729
729
  },
730
730
  refreshParent() {
731
731
  self.getPage(1);
@@ -795,7 +795,7 @@
795
795
  }
796
796
  self.$forceUpdate();
797
797
  self.$refs.footer.$forceUpdate();
798
- self.updateCurrentRow(field);
798
+ self.updateCurrentRow(field,data);
799
799
  })
800
800
  }
801
801
  }
@@ -865,14 +865,14 @@
865
865
  //}
866
866
  //self.$refs
867
867
  },
868
- updateCurrentRow(router) {
868
+ updateCurrentRow(router,data) {
869
869
  let self = this;
870
870
  if (router.flagFreshCurrentRow) {
871
871
  self.tableComplate = true;
872
872
  self.model.getCurrentRowApiData(function () {
873
873
  self.$forceUpdate();
874
874
  self.tableComplate = false;
875
- });
875
+ },data,router);
876
876
  }
877
877
  },
878
878
  importComplete(res) {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="app-Tree" style="height:100%;">
3
3
  <el-container style="height: calc(100vh - 98px);border: 1px solid #eee">
4
- <el-aside :width="leftWidth?leftWidth+'px':'15%'" style="background-color:white">
4
+ <el-aside :width="leftWidth?leftWidth+'px':'15%'" style="background-color:white;border-radius: 6px;">
5
5
  <ct-searchtree :flagsearch="true" :searchConditionApi="searchConditionApi" :searchDataApi="searchDataApi" @loaded="loaded"></ct-searchtree>
6
6
  </el-aside>
7
7
  <el-main v-if="isShowMain">
@@ -554,7 +554,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
554
554
  console.error(error);
555
555
  });
556
556
  },
557
- getCurrentRowApiData(callback) {
557
+ getCurrentRowApiData(callback,rtnData,router) {
558
558
  var self = this;
559
559
  var searchFields = this.searchModel ? this.searchModel.searchData : { fields: [] };
560
560
  if (self.primaryKey) {
@@ -563,7 +563,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
563
563
  groupName: self.primaryKey,
564
564
  operation: 2,
565
565
  searchDataType: 3,
566
- searchValue1: rtn.listData[rtn.selectIndex][self.primaryKey],
566
+ searchValue1: router.actionType==Enum.ActionType.New? rtnData.responseData.content: rtn.listData[rtn.selectIndex][self.primaryKey],
567
567
  });
568
568
  }
569
569
  Vue.prototype.$api.postHandler(common.globalUri(), {
@@ -577,11 +577,23 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
577
577
  .then(function (response) {
578
578
  if (response.rtnCode === Enum.ReturnCode.Successful) {
579
579
  if (response.content.rows.length > 0) {
580
- response.content.rows.forEach((row) => {
581
- for (var vkey in row) {
582
- rtn.dataDictionary[row[rtn.primaryKey]][vkey] = row[vkey];
583
- }
584
- });
580
+ if(router.actionType==Enum.ActionType.New){
581
+ rtn.setStyleRow(response.content.rows);
582
+ response.content.rows.forEach((nr) => {
583
+ rtn.listData.unshift(nr);
584
+ });
585
+ rtn.dataDictionary = response.content.rows;
586
+
587
+ source.page.rows = source.page.rows + response.content.rows.length;
588
+ rtn.$vue.calculatingRowHeight()
589
+ }
590
+ else{
591
+ response.content.rows.forEach((row) => {
592
+ for (var vkey in row) {
593
+ rtn.dataDictionary[row[rtn.primaryKey]][vkey] = row[vkey];
594
+ }
595
+ });
596
+ }
585
597
  }
586
598
 
587
599
  if (typeof response.content.foot !== 'undefined') {