centaline-data-driven 1.1.31 → 1.1.32

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.1.31",
3
+ "version": "1.1.32",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="app-search" style="height:100%;position: fixed;">
3
3
  <!-- <ct-searchlist :searchConditionApi="'/api/third-dept-tran/tran-list/layout'" :searchDataApi="'/api/third-dept-tran/tran-list'"></ct-searchlist> -->
4
- <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getList'"></ct-searchlist>
4
+ <ct-searchlist :searchConditionApi="'/PropertyRETList/getLayoutOfSearch'" :searchDataApi="'/PropertyRETList/getListOfSearchModel'" :searchCategoryApi="'/PropertyRETList/getLayoutOfSearchCategory'"></ct-searchlist>
5
5
  <!--<ct-searchlist :searchConditionApi="'/api/invoice-info/search-condition'" :searchDataApi="'/api/invoice-info/list'" :searchDataStatisticsApi="'api/ContractList/GetLayoutOfStatisticsTool'" :apiParam="para"></ct-searchlist>-->
6
6
  <ct-dialog-list></ct-dialog-list>
7
7
  </div>
@@ -716,4 +716,3 @@ html {
716
716
  .el-card.is-always-shadow{
717
717
  box-shadow: none!important;
718
718
  }
719
-
@@ -46,6 +46,7 @@
46
46
  .max-btn-add button{ /*list-button*/
47
47
  height: 26px;
48
48
  background: #EE6B6B;
49
+ border-color:#EE6B6B;
49
50
  box-shadow: 0px 2px 4px 0px rgba(238,107,107,0.25);
50
51
  border-radius: 6px;
51
52
  }
@@ -140,6 +141,11 @@
140
141
  height:6px;
141
142
  background-color:#f1f1f1
142
143
  }
144
+ .st-serach-screen::-webkit-scrollbar,.max-seachpopper::-webkit-scrollbar{
145
+ display: block;
146
+ width:4px;
147
+ height:6px;
148
+ }
143
149
  .ct-table .cell:last-child{
144
150
  white-space: nowrap;
145
151
  }
@@ -28,6 +28,9 @@
28
28
  @input="inputHandler(model.currentRow.data[v.id], model.currentRow.data.$sourceIndex)"></component>
29
29
  </span>
30
30
  <!--<span v-else>{{scope.row[v.id].labelValue}}</span>-->
31
+ <span v-else-if="v.is=='ct-sensitiveeye'">
32
+ <component v-if ref="Fields" :is="v.is" :vmodel="scope.row[v.id]" :vrowmodel="scope.row" :api="model.OptApi"></component>
33
+ </span>
31
34
  <ct-span v-else :vmodel="scope.row[v.id]" :rowNum="scope.row.$sourceIndex" ref="FieldsLabel"></ct-span>
32
35
  </template>
33
36
  </el-table-column>
@@ -127,6 +130,7 @@
127
130
  },
128
131
  //修改
129
132
  saveRow(row, index, isCancel) {
133
+ console.log(row);
130
134
  let app = this;
131
135
  if (app.model.dialogEdit) {
132
136
  this.editRow(row.$sourceIndex);
@@ -0,0 +1,114 @@
1
+ <template>
2
+ <div style="width:100%;display:flex" v-if="model !== null" class="ct-searchcategory" :class="[model.attrs.size?'ct-searchcategory-'+model.attrs.size:''
3
+ ]">
4
+ <div style="flex:1;" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
5
+ <div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
6
+ <img v-if="model.preLabel" :src="model.preLabel" style="width: 1em;height: 1em;fill: currentColor;
7
+ overflow: hidden;vertical-align: middle;"/>
8
+ {{model.label}}
9
+ </div>
10
+ <div class="ct-radios" :class="[model.showLabel?'showLabel':'',model.value !== ''?'hasValue':'']">
11
+ <el-radio-group v-model="model.value" @change="changeHandler1($event)">
12
+ <el-radio-button v-bind="model.attrs" v-for="(value, index) in model.segmentValue" :key="index" v-model="model.value"
13
+ :label="value[model.optionAttrs.value]" :disabled="model.lock">
14
+ {{value[model.optionAttrs.label]}}
15
+ </el-radio-button >
16
+ </el-radio-group>
17
+ </div>
18
+ </div>
19
+ <span v-show="!valid" class="errorMessage">
20
+ {{validMessage}}
21
+ </span>
22
+ </div>
23
+ </template>
24
+ <script>
25
+ import dynamicElement from '../../mixins/dynamicElement';
26
+ export default {
27
+ name: 'ct-searchcategory',
28
+ mixins: [dynamicElement],
29
+ props: {
30
+ vmodel: Object,
31
+ api: String
32
+ },
33
+ data() {
34
+ return {
35
+ };
36
+ },
37
+ mounted() {
38
+ var self = this;
39
+ this.$nextTick(function () {
40
+ if (self.vmodel) {
41
+ self.load(self.vmodel);
42
+ }
43
+ else if (typeof self.source !== 'undefined') {
44
+ self.loaderObj.SearchCategory(self.source,self.load);
45
+ }
46
+ else if (typeof self.api !== 'undefined') {
47
+ self.loaderObj.SearchCategory(self.api, self.load);
48
+ }
49
+ });
50
+ },
51
+ methods: {
52
+ load(data) {
53
+ this.model = data;
54
+ let parm={};
55
+ parm[this.model.id]=this.model.value;
56
+ this.$emit('loadedCategory',parm);
57
+ },
58
+ clearClickHandle: function (event) {
59
+ this.model.value = '';
60
+ this.inputHandler(this.model.value);
61
+ this.changeHandler(this.model.value);
62
+ },
63
+ changeHandler1: function (event) {
64
+ this.inputHandler(this.model.value);
65
+ this.changeHandler(this.model.value);
66
+ let parm={};
67
+ parm[this.model.id]=this.model.value;
68
+ this.$emit('changeCategory',parm);
69
+ }
70
+ }
71
+ }
72
+ </script>
73
+ <style>
74
+ .ct-searchcategory {
75
+ margin-bottom: 10px;
76
+ line-height: 30px;
77
+ }
78
+ .ct-searchcategory .el-input-group__prepend{
79
+ text-align: left;
80
+ color:#EE6B6B;
81
+ font-weight: Bold;
82
+ text-shadow: 0 2px 2px rgb(121 0 4 / 10%);
83
+ font-size: 20px;
84
+ vertical-align: middle;
85
+ }
86
+ .ct-searchcategory .ct-radios {
87
+ color: #606266;
88
+ border-radius: 4px;
89
+ /*border: 1px solid #dcdfe6;*/
90
+ line-height: 40px;
91
+ padding-left: 15px;
92
+ text-align: right;
93
+ }
94
+ .ct-searchcategory .ct-radios:hover {
95
+ border-color: #c0c4cc;
96
+ }
97
+ .ct-searchcategory .ct-radios .el-radio {
98
+ margin-left: 0px;
99
+ margin-right: 10px;
100
+ }
101
+ .ct-searchcategory .ct-radios .ct-Seg-label {
102
+ margin-right: 15px;
103
+ }
104
+ .ct-searchcategory .el-radio-button__orig-radio:checked+.el-radio-button__inner {
105
+ color: #FFF;
106
+ background-color: #EE6B6B;
107
+ border-color: #EE6B6B;
108
+ -webkit-box-shadow: -1px 0 0 0 #EE6B6B;
109
+ box-shadow: -1px 0 0 0 #EE6B6B;
110
+ }
111
+ .ct-searchcategory .el-radio-button__inner:hover {
112
+ color: #EE6B6B;
113
+ }
114
+ </style>
@@ -3,15 +3,22 @@
3
3
  <div slot="header" class="clearfix" v-if="typeof title !== 'undefined' && showTitle">
4
4
  <span style="font-weight:bold">{{title}}</span>
5
5
  </div>
6
- <ct-searchscreen ref="screen" :api="searchConditionApi" @loaded="screenLoaded" :screenPara="apiParam" @search="search()" @showTitle="showTitleScreenHandler"></ct-searchscreen>
6
+ <ct-searchcategory v-if="searchCategoryApi" ref="category" :api="searchCategoryApi" @loadedCategory="categoryLoaded"
7
+ @changeCategory="categorychange" ></ct-searchcategory>
8
+
9
+ <ct-searchscreen ref="screen" :api="searchConditionApi" :key="reloadKey"
10
+ @loaded="screenLoaded" :screenPara="screenPara"
11
+ :categoryLoaded="loaded.categoryLoaded" @search="search()"
12
+ @showTitle="showTitleScreenHandler"></ct-searchscreen>
13
+
7
14
  <ct-searchtable ref="table" :api="searchDataApi" :searchDataStatisticsApi="searchDataStatisticsApi"
8
- @toolbarClick="toolbarClickHandler"
9
- @refreshParent="refreshParentHandler"
15
+ @toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKey"
10
16
  @showTitle="showTitleHandler"></ct-searchtable>
11
17
  </div>
12
18
  </template>
13
19
  <script>
14
20
  import dynamicElement from '../../mixins/dynamicElement';
21
+ import dynamicSearchCategory from './dynamicSearchCategory.vue';
15
22
  import dynamicSearchScreen from './dynamicSearchScreen.vue';
16
23
  import dynamicSearchTable from './dynamicSearchTable.vue';
17
24
  import progress from '../../progress/src/progress.vue';
@@ -21,10 +28,12 @@
21
28
  components: {
22
29
  'ct-searchscreen': dynamicSearchScreen,
23
30
  'ct-searchtable': dynamicSearchTable,
24
- 'ct-progress': progress
31
+ 'ct-progress': progress,
32
+ 'ct-searchcategory': dynamicSearchCategory
25
33
  },
26
34
  props: {
27
35
  vmodel: Object,
36
+ searchCategoryApi: String,
28
37
  searchConditionApi: String,
29
38
  searchDataApi: String,
30
39
  searchDataStatisticsApi: String,
@@ -36,6 +45,10 @@
36
45
  },
37
46
  created() {
38
47
  this.model = this.vmodel;
48
+ this.screenPara=this.apiParam;
49
+ if(this.searchCategoryApi){
50
+ this.loaded.categoryLoaded=false;
51
+ }
39
52
  },
40
53
  computed: {
41
54
  searchListStyle: function() {
@@ -43,16 +56,20 @@
43
56
  return { 'height': this.pageHeight };
44
57
  }
45
58
  return {};
46
- }
59
+ },
47
60
  },
48
61
  data() {
49
62
  return {
50
63
  loaded: {
51
64
  screenLoaded: false,
52
- tableLoaded: false
65
+ tableLoaded: false,
66
+ categoryLoaded: true,
53
67
  },
54
68
  title:'',
55
69
  showTitle:false,
70
+ screenPara:null,
71
+ reloadKey:0,
72
+ isReload:false,
56
73
  }
57
74
  },
58
75
  methods: {
@@ -61,6 +78,15 @@
61
78
  this.$refs.table.searchComplate(this.$refs.screen.model, defaultSearch);
62
79
  this.$emit('loaded', this.$refs.screen.model);
63
80
  },
81
+ categoryLoaded(param) {
82
+ this.loaded.categoryLoaded = true;
83
+ if(param)this.screenPara=param;
84
+ this.$refs.screen.searchComplate();
85
+ },
86
+ categorychange(param) {
87
+ if(param)this.screenPara=param;
88
+ this.reloadKey = this.reloadKey+1;
89
+ },
64
90
  search(btn) {
65
91
  if (this.$refs.table.model) {
66
92
  this.$refs.table.getPage(1);
@@ -45,6 +45,7 @@
45
45
  props: {
46
46
  api: String,
47
47
  vmodel: Object,
48
+ categoryLoaded:Boolean,
48
49
  screenPara: {
49
50
  type: Object,
50
51
  default: () => { }
@@ -61,17 +62,19 @@
61
62
  },
62
63
  mounted() {
63
64
  var self = this;
64
- this.$nextTick(function () {
65
- if (typeof self.api !== 'undefined') {
66
- self.loaderObj.SearchScreen(self.api, self.load, self.screenPara);
67
- }
68
- if (typeof self.source !== 'undefined') {
69
- self.load(self.loaderObj.SearchScreen(self.source));
70
- }
71
- if (self.vmodel) {
72
- self.load(self.vmodel);
73
- }
74
- });
65
+ if(self.categoryLoaded){
66
+ this.$nextTick(function () {
67
+ if (typeof self.api !== 'undefined') {
68
+ self.loaderObj.SearchScreen(self.api, self.load, self.screenPara);
69
+ }
70
+ if (typeof self.source !== 'undefined') {
71
+ self.load(self.loaderObj.SearchScreen(self.source));
72
+ }
73
+ if (self.vmodel) {
74
+ self.load(self.vmodel);
75
+ }
76
+ });
77
+ }
75
78
  },
76
79
  methods: {
77
80
  clickHandler(model) {
@@ -156,7 +159,21 @@
156
159
  self.isLoading = false;
157
160
  self.$emit('loaded', self.model.defaultSearch);
158
161
  self.$emit('showTitle');
159
- }
162
+ },
163
+ searchComplate() {
164
+ var self = this;
165
+ this.$nextTick(function () {
166
+ if (typeof self.api !== 'undefined') {
167
+ self.loaderObj.SearchScreen(self.api, self.load, self.screenPara);
168
+ }
169
+ if (typeof self.source !== 'undefined') {
170
+ self.load(self.loaderObj.SearchScreen(self.source));
171
+ }
172
+ if (self.vmodel) {
173
+ self.load(self.vmodel);
174
+ }
175
+ });
176
+ },
160
177
  }
161
178
  }
162
179
  </script>
@@ -38,8 +38,7 @@
38
38
  },
39
39
  mounted() {
40
40
  var self = this;
41
- this.$nextTick(function () {
42
-
41
+ this.$nextTick(function () {
43
42
  if (self.vmodel) {
44
43
  self.load(self.vmodel);
45
44
  self.$emit('loaded');
@@ -0,0 +1,11 @@
1
+ import dynamicSensitiveEye from './src/dynamicSensitiveEye'
2
+
3
+ dynamicSensitiveEye.install = function (Vue) {
4
+ Vue.component(dynamicSensitiveEye.name, dynamicSensitiveEye);
5
+ }
6
+
7
+ if (typeof window !== 'undefined' && window.Vue) {
8
+ window.Vue.use(dynamicSensitiveEye);
9
+ }
10
+
11
+ export default dynamicSensitiveEye
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <div class="field-top">
3
+ <div v-if="model !== null" class="ct-text ct-flex-div" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'',model.attrs.size?'ct-font-size-'+model.attrs.size:'']">
4
+ <div v-if="model.showLabel && model.label" class="el-input-group__prepend field-label-div" :class="[model.labelClass]">
5
+ <span>{{model.label}}</span>
6
+ </div>
7
+ <span>{{showLable==true?model.labelValue1:model.labelValue}}</span>
8
+ <i v-if="model.labelValue" class="el-icon-view" @click="onSensitiveEye($event)"></i>
9
+ </div>
10
+ </div>
11
+
12
+ </template>
13
+ <script>
14
+ import dynamicElement from '../../mixins/dynamicElement'
15
+ export default {
16
+ name: 'ct-sensitiveeye',
17
+ props: {
18
+ vmodel: Object,
19
+ vrowmodel: Object
20
+ },
21
+ mixins: [dynamicElement],
22
+ data: function () {
23
+ return {
24
+ showLable: false,
25
+ };
26
+ },
27
+ created() {
28
+ if (typeof this.vmodel === 'undefined') {
29
+ this.model = this.loaderObj.SensitiveEye(this.source);
30
+ }
31
+ else {
32
+ this.model = this.vmodel;
33
+ }
34
+ },
35
+ computed: {
36
+
37
+ },
38
+ methods: {
39
+ onSensitiveEye() {
40
+ if (this.model.labelValue1 == '') {
41
+ var extraData = "";
42
+ if (typeof this.vrowmodel != 'undefined') {
43
+ let submitData = {};
44
+ this.model.refFieldName.forEach((v) => {
45
+ submitData[v] = this.vrowmodel[v].value;
46
+ });
47
+ extraData = JSON.stringify(submitData);
48
+ }
49
+ this.model.getOptions(this.model.paramAction, extraData);
50
+ }
51
+ this.showLable = !this.showLable;
52
+ },
53
+ }
54
+ }
55
+ </script>
56
+ <style>
57
+ .el-icon-view {
58
+ margin-left: 5px;
59
+ font-size: 16px;
60
+ }
61
+ </style>
@@ -46,7 +46,8 @@ const box = function (source, callBack) {
46
46
  checked.forEach((v) => {
47
47
  if (self.checkedItemArr.indexOf(v[this.optionAttrs.value]) > -1) {
48
48
  v[this.optionAttrs.flagDeleted] = false;
49
- currentOptions.splice(currentOptions.findIndex((op) => { return op[rtn.optionAttrs.value] === v[rtn.optionAttrs.value] }), 1);
49
+ let ic=currentOptions.findIndex((op) => { return op[rtn.optionAttrs.value] === v[rtn.optionAttrs.value] });
50
+ if(ic>-1) currentOptions.splice(ic, 1);
50
51
  }
51
52
  else {
52
53
  v[this.optionAttrs.flagDeleted] = true;
@@ -0,0 +1,50 @@
1
+ import base from '../../index';
2
+ import Base from './Base';
3
+ import valid from '../../../validate/index';
4
+ import Enum from './lib/Enum';
5
+ import common from '../../../common';
6
+ import Vue from 'vue';
7
+ const SearchCategory = function (source, callBack) {
8
+ var init = function (data) {
9
+ var rtn = {
10
+ showLabel:true,
11
+ get value() {
12
+ if(!data.code1){
13
+ return rtn.segmentValue[0].code;
14
+ }
15
+ return data.code1;
16
+ },
17
+ set value(v) {
18
+ data.code1 = v;
19
+ },
20
+ get segmentValue() {
21
+ return data.selectItems1;
22
+ },
23
+ optionAttrs: {
24
+ value: 'code',
25
+ label: 'name',
26
+ actionType: 'actionType',
27
+ flagDeleted: 'flagDeleted'
28
+ }
29
+ };
30
+ rtn = base.copy(Base(data), rtn);
31
+ rtn = base.copy(rtn, valid.Init(rtn));
32
+ return rtn;
33
+ }
34
+ if (typeof source === 'string') {
35
+ Vue.prototype.$api.postHandler(common.globalUri(), { action: source,para:{} }).then(
36
+ function (response) {
37
+ if (response.rtnCode === Enum.ReturnCode.Successful) {
38
+ var rtn = init(response.content.fields[0]);
39
+ if (callBack) {
40
+ callBack(rtn);
41
+ }
42
+ }
43
+ }
44
+ );
45
+ }
46
+ else {
47
+ return init(source);
48
+ }
49
+ }
50
+ export default SearchCategory;
@@ -0,0 +1,65 @@
1
+ import base from '../../index';
2
+ import Base from './Base';
3
+ import Vue from 'vue';
4
+ import common from '../../../common';
5
+ import Enum from './lib/Enum';
6
+
7
+ const SensitiveEye = function (source) {
8
+ var rtn = {
9
+ get labelValue() {
10
+ if (source.name1)
11
+ return source.name1;
12
+ else
13
+ return '';
14
+ },
15
+ set labelValue(v) {
16
+ source.name1=v;
17
+ },
18
+ get labelValue1() {
19
+ if (source.code1)
20
+ return source.code1;
21
+ else
22
+ return '';
23
+ },
24
+ set labelValue1(v) {
25
+ source.code1 = v;
26
+ },
27
+ get paramAction() {
28
+ if (source.paramAction1)
29
+ return source.paramAction1;
30
+ else
31
+ return '';
32
+ },
33
+ apiParams: {
34
+ paramName: 'k',
35
+ parentName: 'pk',
36
+ parentValue: 'pv',
37
+ search: 't'
38
+ },
39
+ getOptions(paramsAction, extraData) {
40
+ var self = this;
41
+ var apiAddrs = paramsAction || this.api;
42
+ console.log(extraData);
43
+ if (extraData=="") {
44
+ extraData = rtn.getFormRefFieldPara();
45
+ }
46
+ var params = {
47
+ action: apiAddrs,
48
+ para: {
49
+ paramName: self.paramName,
50
+ parentValue: rtn.getFormParentFieldPara(),
51
+ extraData: extraData
52
+ }
53
+ };
54
+ Vue.prototype.$api.postHandler(common.globalUri(), params).then((response) => {
55
+ if (response.rtnCode === Enum.ReturnCode.Successful) {
56
+ self.labelValue1 = response.content;
57
+ }
58
+ });
59
+ },
60
+ };
61
+ rtn = base.copy(Base(source), rtn);
62
+ return rtn;
63
+ };
64
+
65
+ export default SensitiveEye;
@@ -27,6 +27,7 @@ import GM from '../GM';
27
27
  import File from '../File';
28
28
  import HyperLink from '../HyperLink';
29
29
  import PlaceHolder from '../PlaceHolder';
30
+ import SensitiveEye from '../SensitiveEye';
30
31
 
31
32
  const LibFunction = {
32
33
  install(Vue) {
@@ -289,6 +290,10 @@ const LibFunction = {
289
290
  item = PlaceHolder(field);
290
291
  item.is = 'ct-ph';
291
292
  break;
293
+ case Enum.ControlType.SensitiveEye://敏感数据小眼睛控
294
+ item = SensitiveEye(field);
295
+ item.is = 'ct-sensitiveeye';
296
+ break;
292
297
  default:
293
298
  item = L(field);
294
299
  item.is = 'ct-labelText';
@@ -28,6 +28,7 @@ const loader = {
28
28
  L: require("./ctl/L.js").default,
29
29
  File: require("./ctl/File.js").default,
30
30
  Tree: require("./ctl/Tree.js").default,
31
+ SearchCategory: require("./ctl/SearchCategory.js").default,
31
32
  };
32
33
 
33
34
  export default loader;