centaline-data-driven 1.1.17 → 1.1.22

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.
Files changed (68) hide show
  1. package/.vs/Centaline.Front_End.DataDriven/DesignTimeBuild/.dtbcache +0 -0
  2. package/.vs/Centaline.Front_End.DataDriven/v16/Server/sqlite3/db.lock +0 -0
  3. package/.vs/Centaline.Front_End.DataDriven/v16/Server/sqlite3/storage.ide +0 -0
  4. package/README.md +7 -7
  5. package/build/webpack.dev.conf.js +1 -1
  6. package/config/dev.env.js +2 -2
  7. package/obj/Centaline.Front_End.DataDriven.csproj.nuget.dgspec.json +9 -11
  8. package/obj/Centaline.Front_End.DataDriven.csproj.nuget.g.props +3 -7
  9. package/obj/project.assets.json +9 -16
  10. package/package.json +1 -1
  11. package/src/Form.vue +2 -2
  12. package/src/SearchList.vue +2 -2
  13. package/src/centaline/api/index.js +16 -8
  14. package/src/centaline/comfirm/src/comfirm.vue +15 -6
  15. package/src/centaline/common/index.js +41 -26
  16. package/src/centaline/css/common.css +16 -2
  17. package/src/centaline/dialogList/src/dialog.vue +2 -2
  18. package/src/centaline/dialogList/src/dialogList.vue +3 -1
  19. package/src/centaline/dialogList/src/dialogNew.vue +16 -16
  20. package/src/centaline/dynamicBtn/src/dynamicBtn.vue +16 -16
  21. package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +3 -5
  22. package/src/centaline/dynamicDtd/src/dynamicDtd.vue +4 -4
  23. package/src/centaline/dynamicFile/src/dynamicFile.vue +14 -14
  24. package/src/centaline/dynamicForm/src/dynamicForm.vue +3 -3
  25. package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +13 -13
  26. package/src/centaline/dynamicHyperLink/index.js +1 -1
  27. package/src/centaline/dynamicPlaceHolder/index.js +1 -1
  28. package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchList.vue +1 -1
  29. package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchListTable.vue +6 -6
  30. package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +14 -14
  31. package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +4 -4
  32. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +2 -2
  33. package/src/centaline/dynamicT/src/dynamicT.vue +4 -4
  34. package/src/centaline/dynamicTimeSelect/src/dynamicTimeSelect.vue +0 -1
  35. package/src/centaline/imgPreview/index.js +6 -6
  36. package/src/centaline/imgPreview/src/imgPreview.vue +3 -3
  37. package/src/centaline/index.js +14 -14
  38. package/src/centaline/loader/index.js +5 -5
  39. package/src/centaline/loader/src/ctl/Button.js +3 -3
  40. package/src/centaline/loader/src/ctl/Checkbox.js +46 -46
  41. package/src/centaline/loader/src/ctl/ComboBoxWithTextBox.js +11 -11
  42. package/src/centaline/loader/src/ctl/D.js +2 -2
  43. package/src/centaline/loader/src/ctl/Dtd.js +18 -18
  44. package/src/centaline/loader/src/ctl/DtdOld.js +8 -8
  45. package/src/centaline/loader/src/ctl/File.js +1 -1
  46. package/src/centaline/loader/src/ctl/Form.js +11 -7
  47. package/src/centaline/loader/src/ctl/FormList.js +1 -1
  48. package/src/centaline/loader/src/ctl/HyperLink.js +1 -1
  49. package/src/centaline/loader/src/ctl/InputNumber.js +2 -1
  50. package/src/centaline/loader/src/ctl/Iti.js +1 -1
  51. package/src/centaline/loader/src/ctl/PlaceHolder.js +2 -2
  52. package/src/centaline/loader/src/ctl/SearchScreen.js +5 -5
  53. package/src/centaline/loader/src/ctl/SearchTable.js +6 -2
  54. package/src/centaline/loader/src/ctl/T.js +1 -1
  55. package/src/centaline/loader/src/ctl/TimeSelect.js +12 -9
  56. package/src/centaline/loader/src/ctl/lib/Enum.js +9 -1
  57. package/src/centaline/loader/src/ctl/lib/LibFunction.js +17 -10
  58. package/src/centaline/loader/src/ctl.js +2 -1
  59. package/src/centaline/mixins/dynamicElement.js +34 -34
  60. package/src/centaline/progress/src/progress.vue +37 -37
  61. package/src/centaline/templateControls/src/dynamicTableCurrency.vue +1 -1
  62. package/src/centaline/templates/src/ContractSearch.js +4 -4
  63. package/src/main.js +3 -3
  64. package/wwwroot/static/centaline/centaline-data-driven.js +2 -2
  65. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
  66. package/.vs/Centaline.Front_End.DataDriven/DesignTimeBuild/.dtbcache.v2 +0 -0
  67. package/.vs/Centaline.Front_End.DataDriven/config/applicationhost.config +0 -1015
  68. package/obj/Debug/netcoreapp2.1/.NETCoreApp,Version=v2.1.AssemblyAttributes.cs +0 -4
@@ -1,15 +1,15 @@
1
1
  import imgPreview from './src/imgPreview.vue'
2
2
 
3
3
  imgPreview.install = function (Vue) {
4
- Vue.component(imgPreview.name, imgPreview);
4
+ Vue.component(imgPreview.name, imgPreview);
5
5
  //import ElImageViewer from "element-ui/packages/image/src/image-viewer";
6
- //Vue.component("ElImageViewer", ElImageViewer);
6
+ //Vue.component("ElImageViewer", ElImageViewer);
7
7
 
8
8
  const PreviewConstructor = Vue.extend(imgPreview);
9
9
  const instance = new PreviewConstructor();
10
- instance.$mount(document.createElement("div"));
10
+ instance.$mount(document.createElement("div"));
11
11
  setTimeout(function () {
12
- document.body.appendChild(instance.$el);
12
+ document.body.appendChild(instance.$el);
13
13
  }, 1000);
14
14
 
15
15
 
@@ -24,8 +24,8 @@ imgPreview.install = function (Vue) {
24
24
  }
25
25
 
26
26
  if (typeof window !== 'undefined' && window.Vue) {
27
- window.Vue.use(imgPreview);
28
-
27
+ window.Vue.use(imgPreview);
28
+
29
29
  const PreviewConstructor = Vue.extend(imgPreview);
30
30
  const instance = new PreviewConstructor();
31
31
  instance.$mount(document.createElement("div"));
@@ -3,9 +3,9 @@
3
3
  :urlList="previewImages"
4
4
  :on-close="closeViewer"></el-image-viewer>
5
5
  </template>
6
- <script>
6
+ <script>
7
7
  //该组件打包被排除(会导致包大很多),不排除的话无法使用,todo待更新
8
- //import ElImageViewer from "element-ui/packages/image/src/image-viewer";
8
+ //import ElImageViewer from "element-ui/packages/image/src/image-viewer";
9
9
  export default {
10
10
  name: 'ctImgPreview',
11
11
  data() {
@@ -23,4 +23,4 @@
23
23
  }
24
24
  }
25
25
  };
26
- </script>
26
+ </script>
@@ -1,30 +1,30 @@
1
1
  const paths = require('../../build/centaline/centaline.path').default;
2
2
  //import './css/common.css'
3
3
  import babelpolyfill from 'babel-polyfill'
4
-
4
+
5
5
  let defaultInstallOpt = {
6
6
  baseUrl: '',
7
- zIndex: 2000,
7
+ zIndex: 2000,
8
8
  showRequestErrorMessage: true,
9
- handler: {
9
+ handler: {
10
10
  // 打开tab页
11
11
  openTab: function (action, submitData, pageTitle) {
12
12
 
13
- },
13
+ },
14
14
  // 关闭当前tab页
15
15
  closeTab: function () {
16
16
 
17
- },
18
- // 获取请求头
19
- getRequestHeaders: function () {
20
- return {};
21
- },
22
- // 请求完成事件,可判断是否登录过期执行响应操作
23
- requestComplete: function (response) {
24
-
17
+ },
18
+ // 获取请求头
19
+ getRequestHeaders: function () {
20
+ return {};
21
+ },
22
+ // 请求完成事件,可判断是否登录过期执行响应操作
23
+ requestComplete: function (response) {
24
+
25
25
  }
26
26
  }
27
- }
27
+ }
28
28
 
29
29
  const centaline = {
30
30
  install(Vue, opts = {}) {
@@ -37,7 +37,7 @@ const centaline = {
37
37
  var plug = require("./" + plugName + "/index.js").default;
38
38
  Vue.use(plug);
39
39
  }
40
-
40
+
41
41
  opts.handler = Object.assign(defaultInstallOpt.handler, opts.handler)
42
42
  const option = Object.assign(defaultInstallOpt, opts)
43
43
  Vue.prototype.$dataDrivenOpts = option
@@ -42,8 +42,8 @@ var loader = {
42
42
  delete rtn[k];
43
43
  rtn[k] = args[i][k];
44
44
  this.arrayVariation(rtn, args[i], k);
45
- }
46
- else if (args[i][k] instanceof Date) {
45
+ }
46
+ else if (args[i][k] instanceof Date) {
47
47
  this.dep(rtn, args[i], k);
48
48
  }
49
49
  else {
@@ -94,9 +94,9 @@ var loader = {
94
94
  * @param {Object} tempData 临时存储的监听对象
95
95
  * @desc 根据key值,将合并对象与源数据的对象属性绑定监听
96
96
  */
97
- depObj: function (obj, source, key, tempData) {
98
- if (key == 'timeValue') {
99
- debugger
97
+ depObj: function (obj, source, key, tempData) {
98
+ if (key == 'timeValue') {
99
+ debugger
100
100
 
101
101
  }
102
102
  var property = Object.getOwnPropertyDescriptor(source, key);
@@ -14,10 +14,10 @@ const Button = function (source, router) {
14
14
  set label(v) {
15
15
  source.controlLabel = v;
16
16
  },
17
- get isHyperLink() {
17
+ get isHyperLink() {
18
18
  if (router) {
19
- return router.isHyperLink;
20
- }
19
+ return router.isHyperLink;
20
+ }
21
21
  return false;
22
22
  },
23
23
  };
@@ -7,55 +7,55 @@ const box = function (source, callBack) {
7
7
  var self = this;
8
8
  var init = function (data) {
9
9
  var rtn = {
10
- get options() {
11
- return source.selectItems1;
12
- },
10
+ get options() {
11
+ return source.selectItems1;
12
+ },
13
13
  checkedIsInit: false,
14
14
  get checkedItemArr() {
15
15
  if (this._checkedItemArr === null) {
16
16
  return this._checkedItemArr;
17
17
  }
18
18
  else {
19
- this._checkedItemArr = this.getCheckedItemArr();
19
+ this._checkedItemArr = this.getCheckedItemArr();
20
20
  //return this._checkedItemArr;
21
21
  return this._checkedItemArr;
22
22
  }
23
- },
24
- getCheckedItemArr() {
25
- var itemArr = [];
26
- var checked = source.code1 === '' ? [] : [].concat(JSON.parse(source.code1));
27
- checked.forEach((v) => {
28
- if (v[this.optionAttrs.value]) {
23
+ },
24
+ getCheckedItemArr() {
25
+ var itemArr = [];
26
+ var checked = source.code1 === '' ? [] : [].concat(JSON.parse(source.code1));
27
+ checked.forEach((v) => {
28
+ if (v[this.optionAttrs.value]) {
29
29
  if (!v[this.optionAttrs.flagDeleted]) {
30
- itemArr.push(v[this.optionAttrs.value]);
31
- }
30
+ itemArr.push(v[this.optionAttrs.value]);
31
+ }
32
32
  }
33
- });
34
- return itemArr;
35
- },
36
- //checkedItemArr1:[],
33
+ });
34
+ return itemArr;
35
+ },
36
+ //checkedItemArr1:[],
37
37
  //手动维护code1值
38
- updateCode1() {
39
- let self = this;
38
+ updateCode1() {
39
+ let self = this;
40
40
  var currentOptions = this.options.filter((value) => {
41
41
  return self.checkedItemArr.indexOf(value[self.optionAttrs.value]) >= 0;
42
- });
43
-
44
- if (source.code1 !== '') {
45
- var checked = source.code1 === '' ? [] : [].concat(JSON.parse(source.code1));
46
- checked.forEach((v) => {
47
- if (self.checkedItemArr.indexOf(v[this.optionAttrs.value]) > -1) {
42
+ });
43
+
44
+ if (source.code1 !== '') {
45
+ var checked = source.code1 === '' ? [] : [].concat(JSON.parse(source.code1));
46
+ checked.forEach((v) => {
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);
50
- }
51
- else {
52
- v[this.optionAttrs.flagDeleted] = true;
53
- }
54
- });
55
-
56
- checked = checked.concat(currentOptions);
57
- source.code1 = JSON.stringify(checked);
58
- }
49
+ currentOptions.splice(currentOptions.findIndex((op) => { return op[rtn.optionAttrs.value] === v[rtn.optionAttrs.value] }), 1);
50
+ }
51
+ else {
52
+ v[this.optionAttrs.flagDeleted] = true;
53
+ }
54
+ });
55
+
56
+ checked = checked.concat(currentOptions);
57
+ source.code1 = JSON.stringify(checked);
58
+ }
59
59
  else {
60
60
  if (self.checkedItemArr.length === 0) {
61
61
  source.code1 = '';
@@ -66,23 +66,23 @@ const box = function (source, callBack) {
66
66
  }
67
67
  },
68
68
  reset() {
69
- this.value = this.defaultValue;
69
+ this.value = this.defaultValue;
70
70
  this.forceUpdate();
71
71
  },
72
72
  optionAttrs: {
73
73
  value: 'code',
74
- label: 'name',
75
- actionType: 'actionType',
74
+ label: 'name',
75
+ actionType: 'actionType',
76
76
  flagDeleted: 'flagDeleted'
77
- },
78
- //用于处理源数据改动,强制更新视图数据(一些无法直接映射的源数据)
79
- forceUpdate() {
80
- var self = this;
81
- Vue.set(self, "checkedItemArr", self.getCheckedItemArr());
82
- Vue.set(self, "options", source.selectItems1);
83
- if (this.self.$forceUpdate) {
84
- this.self.$forceUpdate();
85
- }
77
+ },
78
+ //用于处理源数据改动,强制更新视图数据(一些无法直接映射的源数据)
79
+ forceUpdate() {
80
+ var self = this;
81
+ Vue.set(self, "checkedItemArr", self.getCheckedItemArr());
82
+ Vue.set(self, "options", source.selectItems1);
83
+ if (this.self.$forceUpdate) {
84
+ this.self.$forceUpdate();
85
+ }
86
86
  }
87
87
  };
88
88
  rtn = base.copy(Base(data), rtn);
@@ -3,7 +3,7 @@ import Base from './Base';
3
3
  import valid from '../../../validate/index';
4
4
  import common from '../../../common';
5
5
  import Vue from 'vue';
6
- const cbwt = function (source) {
6
+ const cbwt = function (source) {
7
7
  var rtn = {
8
8
  options: [{ code: source.code1, name: source.name1 }],
9
9
  options1: [{ code: source.code2, name: source.name2 }],
@@ -95,7 +95,7 @@ const cbwt = function (source) {
95
95
  action: apiAddrs,
96
96
  para: {
97
97
  paramName: self['paramName' + numStr],
98
- parentValue: parentValue,
98
+ parentValue: parentValue,
99
99
  extraData: rtn.getFormRefFieldPara()
100
100
  }
101
101
  };
@@ -105,11 +105,11 @@ const cbwt = function (source) {
105
105
  }
106
106
  });
107
107
  },
108
- getFormRefFieldPara() {
109
- if (rtn.form && typeof source.refFieldName !== 'undefined' && source.refFieldName.length > 0) {
110
- if (typeof rtn.form.getRefFieldPara === 'function') {
111
- return JSON.stringify(rtn.form.getRefFieldPara(source.refFieldName));
112
- }
108
+ getFormRefFieldPara() {
109
+ if (rtn.form && typeof source.refFieldName !== 'undefined' && source.refFieldName.length > 0) {
110
+ if (typeof rtn.form.getRefFieldPara === 'function') {
111
+ return JSON.stringify(rtn.form.getRefFieldPara(source.refFieldName));
112
+ }
113
113
  }
114
114
  return null;
115
115
  },
@@ -121,21 +121,21 @@ const cbwt = function (source) {
121
121
  },
122
122
  enumerable: true,
123
123
  configurable: true
124
- });
124
+ });
125
125
  Object.defineProperty(rtnFormObj, source.fieldName2, {
126
126
  get: function () {
127
127
  return source.code2;
128
128
  },
129
129
  enumerable: true,
130
130
  configurable: true
131
- });
131
+ });
132
132
  Object.defineProperty(rtnFormObj, source.fieldName3, {
133
133
  get: function () {
134
134
  return source.code3;
135
135
  },
136
136
  enumerable: true,
137
137
  configurable: true
138
- });
138
+ });
139
139
  Object.defineProperty(rtnFormObj, source.fieldName4, {
140
140
  get: function () {
141
141
  return source.code4;
@@ -160,7 +160,7 @@ const cbwt = function (source) {
160
160
  attrs: {
161
161
  clearable: true
162
162
  },
163
- };
163
+ };
164
164
  var baseSource = Base(source);
165
165
  //rtn.attrs = base.copy(baseSource.attrs, rtn.attrs);
166
166
  rtn = base.copy(baseSource, rtn);
@@ -12,9 +12,9 @@ const D = function (source, dateType) {
12
12
  if (typeof source.valueFormat !== 'undefined') {
13
13
  return source.valueFormat;
14
14
  }
15
- else {
15
+ else {
16
16
  if (dateType === "datetime") {
17
- return 'yyyy-MM-dd HH:mm:ss'
17
+ return 'yyyy-MM-dd HH:mm:ss'
18
18
  }
19
19
  return 'yyyy-MM-dd'
20
20
  }
@@ -6,9 +6,9 @@ import Vue from 'vue';
6
6
  import common from '../../../common';
7
7
 
8
8
  const Dtd = function (source, dateType) {
9
- var self = this;
10
- if (!dateType) {
11
- dateType = "date";
9
+ var self = this;
10
+ if (!dateType) {
11
+ dateType = "date";
12
12
  }
13
13
  var init = function (data) {
14
14
  var rtn = {
@@ -16,9 +16,9 @@ const Dtd = function (source, dateType) {
16
16
  if (typeof source.valueFormat !== 'undefined') {
17
17
  return source.valueFormat;
18
18
  }
19
- else {
19
+ else {
20
20
  if (dateType === "datetime") {
21
- return 'yyyy-MM-dd HH:mm:ss'
21
+ return 'yyyy-MM-dd HH:mm:ss'
22
22
  }
23
23
  return 'yyyy-MM-dd'
24
24
  }
@@ -42,21 +42,21 @@ const Dtd = function (source, dateType) {
42
42
  get value() {
43
43
  return source.code1;
44
44
  },
45
- set value(v) {
46
- if (!v) {
47
- source.code1 = "";
48
- return;
49
- }
45
+ set value(v) {
46
+ if (!v) {
47
+ source.code1 = "";
48
+ return;
49
+ }
50
50
  source.code1 = common.formatDate(v, rtn.valueFormat);
51
51
  },
52
52
  get value1() {
53
53
  return source.code2;
54
54
  },
55
- set value1(v) {
56
- if (!v) {
57
- source.code2 = "";
58
- return;
59
- }
55
+ set value1(v) {
56
+ if (!v) {
57
+ source.code2 = "";
58
+ return;
59
+ }
60
60
  source.code2 = common.formatDate(v, rtn.valueFormat);
61
61
  },
62
62
  get id1() {
@@ -68,7 +68,7 @@ const Dtd = function (source, dateType) {
68
68
  source.code1 = this.formatValue[0];
69
69
  source.code2 = this.formatValue[1];
70
70
  },
71
- getFormObj() {
71
+ getFormObj() {
72
72
  var rtnFormObj = {};
73
73
  Object.defineProperty(rtnFormObj, source.fieldName1, {
74
74
  get: function () {
@@ -89,8 +89,8 @@ const Dtd = function (source, dateType) {
89
89
  attrs: {
90
90
  type: dateType,
91
91
  'unlink-panels': true,
92
- get format() {
93
- return rtn.valueFormat;
92
+ get format() {
93
+ return rtn.valueFormat;
94
94
  },
95
95
  //'value-format': 'yyyy-MM-dd',
96
96
  align: 'left'
@@ -5,9 +5,9 @@ import Axios from 'axios';
5
5
  import Vue from 'vue';
6
6
 
7
7
  const Dtd = function (source, dateType) {
8
- var self = this;
9
- if (!dateType) {
10
- dateType = "daterange";
8
+ var self = this;
9
+ if (!dateType) {
10
+ dateType = "daterange";
11
11
  }
12
12
  var init = function (data) {
13
13
  var rtn = {
@@ -37,11 +37,11 @@ const Dtd = function (source, dateType) {
37
37
  get placeholder1() {
38
38
  return source.placeholder2 || '';
39
39
  },
40
- setFormatValue(v1) {//上面的set formatValue(v1)无法自动触发(无法监听数组)
41
- let dateFormat = "yyyy-MM-dd";
42
- if (dateType === "datetimerange") {
43
- dateFormat = 'yyyy-MM-dd HH:mm:ss';
44
- }
40
+ setFormatValue(v1) {//上面的set formatValue(v1)无法自动触发(无法监听数组)
41
+ let dateFormat = "yyyy-MM-dd";
42
+ if (dateType === "datetimerange") {
43
+ dateFormat = 'yyyy-MM-dd HH:mm:ss';
44
+ }
45
45
 
46
46
  if (v1 && v1.length > 0) {
47
47
  source.code1 = v1[0] && v1[0] instanceof Date ? Vue.prototype.$common.formatDate(v1[0], dateFormat) : "";
@@ -237,7 +237,7 @@ const box = function (source, fileSourceList, router, optionApi) {
237
237
  Vue.prototype.$message.error(res.rtnMsg);
238
238
  }
239
239
  },
240
- deleteFile(file, forceDelete) {
240
+ deleteFile(file, forceDelete) {
241
241
  for (let i = 0; i < rtn.fileList.length; i++) {
242
242
  if (rtn.fileList[i].uid === file.uid) {
243
243
  if (forceDelete) {
@@ -19,7 +19,7 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
19
19
  },
20
20
  set title(v) {
21
21
  source.formTitle = v;
22
- },
22
+ },
23
23
  isChanged: false,
24
24
  get isHorizontalLayout() {
25
25
  return source.layoutOrientation === Enum.Orientation.Horizontal
@@ -51,12 +51,12 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
51
51
  rtn._fields = [];
52
52
  for (var key in source.fields) {
53
53
  let value = source.fields[key];
54
-
55
- let showLabel = true;
56
- let isList = false;
57
- if (isFormList) {
58
- showLabel = false;
59
- isList = true;
54
+
55
+ let showLabel = true;
56
+ let isList = false;
57
+ if (isFormList) {
58
+ showLabel = false;
59
+ isList = true;
60
60
  }
61
61
  let item = LibFunction.GetControl(value, source, showLabel, isList);
62
62
 
@@ -242,6 +242,10 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
242
242
  }
243
243
  //源数据
244
244
  else {
245
+ if (rowNum === null && listData.currentRowIndex) {
246
+ rowNum = listData.currentRowIndex;
247
+ }
248
+
245
249
  if (rowNum === 0 || (rowNum && fiedlId)) {
246
250
  let fields = listData.rows[rowNum].field;
247
251
  field = fields.find((v) => {
@@ -276,7 +276,7 @@ const FormList = function (source, master) {
276
276
  return isDuplicated;
277
277
  },
278
278
  deleteRow(index, callback) {
279
- Vue.prototype.$confirm("确定删除?", "提示", {
279
+ Vue.prototype.$common.confirm("确定删除?", "提示", {
280
280
  confirmButtonText: "确定",
281
281
  cancelButtonText: "取消",
282
282
  //type: 'warning'
@@ -1,5 +1,5 @@
1
1
  import base from '../../index';
2
- import Base from './Base';
2
+ import Base from './Base';
3
3
 
4
4
  const HyperLink = function (source) {
5
5
  var rtn = {
@@ -9,7 +9,8 @@ const box = function (source, callBack) {
9
9
  var rtn = {
10
10
 
11
11
  get clearable() {
12
- if (typeof source.clear === 'undefined') {
12
+
13
+ if (typeof source.clear === 'undefined'&&!source.locked) {
13
14
  return true;
14
15
  }
15
16
  if (source.clear) {
@@ -5,7 +5,7 @@ const Iti = function (source) {
5
5
  var rtn = {
6
6
 
7
7
  get clearable() {
8
- if (typeof source.clear === 'undefined') {
8
+ if (typeof source.clear === 'undefined'&&!source.locked) {
9
9
  return true;
10
10
  }
11
11
  if (source.clear) {
@@ -1,5 +1,5 @@
1
1
  import base from '../../index';
2
- import Base from './Base';
2
+ import Base from './Base';
3
3
 
4
4
  const PlaceHolder = function (source) {
5
5
  var rtn = {
@@ -14,4 +14,4 @@ const PlaceHolder = function (source) {
14
14
  return rtn;
15
15
  };
16
16
 
17
- export default PlaceHolder;
17
+ export default PlaceHolder;
@@ -100,11 +100,11 @@ const SearchScreen = function (source, callBack, screenPara) {
100
100
  rtnscreens = this.initScreen(screens);
101
101
  this._highScreen = rtnscreens;
102
102
  return rtnscreens;
103
- },
104
- setBtnLoading(loading) {
105
- this.btnScreen.forEach(btn => {
106
- btn.disabled = loading;
107
- });
103
+ },
104
+ setBtnLoading(loading) {
105
+ this.btnScreen.forEach(btn => {
106
+ btn.disabled = loading;
107
+ });
108
108
  },
109
109
  get searchData() {
110
110
  var rtn = {
@@ -12,7 +12,8 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
12
12
  tableHeight: 350,
13
13
  defaultSearchData: defaultSearchData,
14
14
  pageIndex: 1,
15
- selectIndex: 0,
15
+ selectIndex: 0,
16
+ selectAll: 0,
16
17
  get source() {
17
18
  return source;
18
19
  },
@@ -348,7 +349,10 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
348
349
  this.apiData(callback);
349
350
  this.selectIndex = 0;
350
351
  this._lastRowspan = null;
351
- if (index === 1) this.setButtonsDisabled();
352
+ if (index === 1) {
353
+ this.setButtonsDisabled();
354
+ this.selectAll = 0;
355
+ }
352
356
  },
353
357
  nextPage: function (callback) {
354
358
  if (this.flagMoreData && this.flagMoreData !== false) {
@@ -8,7 +8,7 @@ const T = function (source, inputType, readonly, isPassword) {
8
8
  // clearable: true,
9
9
  // },
10
10
  get clearable() {
11
- if (typeof source.clear === 'undefined'&&!readonly) {
11
+ if (typeof source.clear === 'undefined'&&!readonly&&!source.locked) {
12
12
  return true;
13
13
  }
14
14
  if (source.clear) {
@@ -2,10 +2,9 @@ import base from '../../index';
2
2
  import Base from './Base';
3
3
  import valid from '../../../validate/index';
4
4
  import Axios from 'axios';
5
+ import common from '../../../common';
5
6
 
6
- const box = function (source, isRange, dateType) {
7
- if (source.code1) source.code1 = new Date('2010-08-01 ' + source.code1);
8
- if (source.code2) source.code2 = new Date('2010-08-01 ' + source.code2);
7
+ const TimeSelect = function (source, isRange, dateType) {
9
8
  var init = function (data) {
10
9
  var rtn = {
11
10
  isRange: isRange,//是否是区间
@@ -22,17 +21,21 @@ const box = function (source, isRange, dateType) {
22
21
  },
23
22
  set valueFormat(v) {
24
23
  source.valueFormat = v;
25
- },
26
- get value() {
24
+ },
25
+ get value() {
26
+ if (source.code1 && Object.prototype.toString.call(source.code1) === "[object String]") source.code1 = new Date(common.formatDate(new Date(), 'yyyy-MM-dd') + ' ' + source.code1);
27
27
  return source.code1;
28
28
  },
29
- set value(v) {
29
+ set value(v) {
30
+ if (v && Object.prototype.toString.call(v) === "[object Date]") v = common.formatDate(v, rtn.valueFormat);
30
31
  source.code1 = v;
31
32
  },
32
- get value1() {
33
+ get value1() {
34
+ if (source.code2 && Object.prototype.toString.call(source.code2) === "[object String]") source.code2 = new Date(common.formatDate(new Date(), 'yyyy-MM-dd') + ' ' + source.code2);
33
35
  return source.code2;
34
36
  },
35
- set value1(v) {
37
+ set value1(v) {
38
+ if (v && Object.prototype.toString.call(v) === "[object Date]") v = common.formatDate(v, rtn.valueFormat);
36
39
  source.code2 = v;
37
40
  },
38
41
  get attrs() {
@@ -54,4 +57,4 @@ const box = function (source, isRange, dateType) {
54
57
  return init(source);
55
58
  }
56
59
  }
57
- export default box;
60
+ export default TimeSelect;