doway-coms 1.4.61 → 1.4.63

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,52 +1,52 @@
1
- {
2
- "name": "doway-coms",
3
- "version": "1.4.61",
4
- "description": "doway组件库",
5
- "author": "dowaysoft",
6
- "main": "packages/index.js",
7
- "license": "MIT",
8
- "scripts": {
9
- "dev": "vue-cli-service serve",
10
- "build": "vue-cli-service build",
11
- "lint": "vue-cli-service lint",
12
- "lib": "vue-cli-service build --target lib --name doway-coms --dest lib packages/index.js",
13
- "build:test": "vue-cli-service build --report"
14
- },
15
- "dependencies": {
16
- "ant-design-vue": "1.7.8",
17
- "axios": "0.18.0",
18
- "element-resize-detector": "^1.2.4",
19
- "js-cookie": "2.2.0",
20
- "vee-validate": "3.4.14",
21
- "vue": "2.7.14",
22
- "vue-contextmenujs": "^1.4.9",
23
- "vue-router": "3.6.5",
24
- "vuedraggable": "^2.24.3",
25
- "vuex": "3.6.2",
26
- "vxe-table": "3.5.4",
27
- "xe-clipboard": "1.10.2",
28
- "xe-utils": "3.5.4"
29
- },
30
- "devDependencies": {
31
- "@vue/cli-plugin-babel": "~4.2.0",
32
- "@vue/cli-plugin-eslint": "~4.2.0",
33
- "@vue/cli-plugin-vuex": "~4.2.0",
34
- "@vue/cli-service": "~4.2.0",
35
- "babel-eslint": "^10.0.3",
36
- "babel-plugin-component": "^1.1.1",
37
- "babel-plugin-import": "^1.13.6",
38
- "eslint": "^6.7.2",
39
- "eslint-plugin-vue": "^6.1.2",
40
- "extract-text-webpack-plugin": "^3.0.2",
41
- "less-loader": "^6.0.0",
42
- "node-sass": "8.0.0",
43
- "sass-loader": "10.4.1",
44
- "vue-template-compiler": "^2.6.11"
45
- },
46
- "bundleDependencies": false,
47
- "repository": {
48
- "type": "git",
49
- "url": "https://www.npmjs.com/package/doway-coms.git"
50
- },
51
- "keywords": []
52
- }
1
+ {
2
+ "name": "doway-coms",
3
+ "version": "1.4.63",
4
+ "description": "doway组件库",
5
+ "author": "dowaysoft",
6
+ "main": "packages/index.js",
7
+ "license": "MIT",
8
+ "scripts": {
9
+ "dev": "vue-cli-service serve",
10
+ "build": "vue-cli-service build",
11
+ "lint": "vue-cli-service lint",
12
+ "lib": "vue-cli-service build --target lib --name doway-coms --dest lib packages/index.js",
13
+ "build:test": "vue-cli-service build --report"
14
+ },
15
+ "dependencies": {
16
+ "ant-design-vue": "1.7.8",
17
+ "axios": "0.18.0",
18
+ "element-resize-detector": "^1.2.4",
19
+ "js-cookie": "2.2.0",
20
+ "vee-validate": "3.4.14",
21
+ "vue": "2.7.14",
22
+ "vue-contextmenujs": "^1.4.9",
23
+ "vue-router": "3.6.5",
24
+ "vuedraggable": "^2.24.3",
25
+ "vuex": "3.6.2",
26
+ "vxe-table": "3.5.4",
27
+ "xe-clipboard": "1.10.2",
28
+ "xe-utils": "3.5.4"
29
+ },
30
+ "devDependencies": {
31
+ "@vue/cli-plugin-babel": "~4.2.0",
32
+ "@vue/cli-plugin-eslint": "~4.2.0",
33
+ "@vue/cli-plugin-vuex": "~4.2.0",
34
+ "@vue/cli-service": "~4.2.0",
35
+ "babel-eslint": "^10.0.3",
36
+ "babel-plugin-component": "^1.1.1",
37
+ "babel-plugin-import": "^1.13.6",
38
+ "eslint": "^6.7.2",
39
+ "eslint-plugin-vue": "^6.1.2",
40
+ "extract-text-webpack-plugin": "^3.0.2",
41
+ "less-loader": "^6.0.0",
42
+ "node-sass": "8.0.0",
43
+ "sass-loader": "10.4.1",
44
+ "vue-template-compiler": "^2.6.11"
45
+ },
46
+ "bundleDependencies": false,
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://www.npmjs.com/package/doway-coms.git"
50
+ },
51
+ "keywords": []
52
+ }
@@ -34,16 +34,26 @@
34
34
  {{ v.errors[0] }}
35
35
  </div>
36
36
  </ValidationProvider>
37
- <span v-else>{{ moment(currentValue).format("YYYY-MM-DD") }}</span>
37
+ <Tooltip placement="topLeft" v-else>
38
+ <template slot="title">
39
+ {{ moment(currentValue).format("YYYY-MM-DD") }}
40
+ </template>
41
+ <span @contextmenu.prevent="(event) => onContextmenu(event, currentValue)">
42
+ {{ moment(currentValue).format("YYYY-MM-DD") }}
43
+ </span>
44
+ </Tooltip>
38
45
  </div>
39
46
  </div>
40
47
  </template>
41
48
 
42
- <script>
43
- import { DatePicker } from "ant-design-vue";
49
+ <script>
50
+ //VXETable插件
51
+ import VXETable from "vxe-table";
52
+ //轻量级剪贴板复制函数
53
+ import XEClipboard from "xe-clipboard";
54
+ import { DatePicker, Tooltip } from "ant-design-vue";
44
55
  import { ValidationProvider } from "vee-validate";
45
56
  import moment from "moment";
46
- import { Tooltip } from "ant-design-vue";
47
57
 
48
58
  export default {
49
59
  name: "BaseDate",
@@ -143,6 +153,28 @@ export default {
143
153
  },
144
154
  created() {},
145
155
  methods: {
156
+ onContextmenu(event, currentValue) {
157
+ this.$contextmenu({
158
+ items: [
159
+ {
160
+ icon: 'ant-design:folder-open-filled',
161
+ label: "复制",
162
+ onClick: () => {
163
+ if (XEClipboard.copy(currentValue)) {
164
+ VXETable.modal.message({
165
+ content: "已复制到剪贴板!",
166
+ status: "success",
167
+ });
168
+ }
169
+ }
170
+ }
171
+ ],
172
+ event,
173
+ zIndex: 100,
174
+ minWidth: 150
175
+ });
176
+ return false;
177
+ },
146
178
  change() {
147
179
  this.$emit("change");
148
180
  },
@@ -29,12 +29,23 @@
29
29
  {{ v.errors[0] }}
30
30
  </div>
31
31
  </ValidationProvider>
32
- <span v-else>{{ moment(currentValue).format("YYYY-MM-DD") }}</span>
32
+ <Tooltip placement="topLeft" v-else>
33
+ <template slot="title">
34
+ {{ moment(currentValue).format("YYYY-MM-DD") }}
35
+ </template>
36
+ <span @contextmenu.prevent="(event) => onContextmenu(event, currentValue)">
37
+ {{ moment(currentValue).format("YYYY-MM-DD") }}
38
+ </span>
39
+ </Tooltip>
33
40
  </div>
34
41
  </div>
35
42
  </template>
36
43
 
37
- <script>
44
+ <script>
45
+ //VXETable插件
46
+ import VXETable from "vxe-table";
47
+ //轻量级剪贴板复制函数
48
+ import XEClipboard from "xe-clipboard";
38
49
  import moment from "moment";
39
50
  import { DatePicker } from "ant-design-vue";
40
51
  import { ValidationProvider } from "vee-validate";
@@ -122,6 +133,28 @@ export default {
122
133
  change() {
123
134
  this.$emit("change");
124
135
  },
136
+ onContextmenu(event, currentValue) {
137
+ this.$contextmenu({
138
+ items: [
139
+ {
140
+ icon: 'ant-design:folder-open-filled',
141
+ label: "复制",
142
+ onClick: () => {
143
+ if (XEClipboard.copy(currentValue)) {
144
+ VXETable.modal.message({
145
+ content: "已复制到剪贴板!",
146
+ status: "success",
147
+ });
148
+ }
149
+ }
150
+ }
151
+ ],
152
+ event,
153
+ zIndex: 100,
154
+ minWidth: 150
155
+ });
156
+ return false;
157
+ }
125
158
  },
126
159
  };
127
160
  </script>
@@ -35,12 +35,23 @@
35
35
  {{ v.errors[0] }}
36
36
  </div>
37
37
  </ValidationProvider>
38
- <span v-else>{{ currentValue }}</span>
38
+ <Tooltip placement="topLeft" v-else>
39
+ <template slot="title">
40
+ {{ currentValue }}
41
+ </template>
42
+ <span @contextmenu.prevent="(event) => onContextmenu(event, currentValue)">
43
+ {{ currentValue }}
44
+ </span>
45
+ </Tooltip>
39
46
  </div>
40
47
  </div>
41
48
  </template>
42
49
 
43
- <script>
50
+ <script>
51
+ //VXETable插件
52
+ import VXETable from "vxe-table";
53
+ //轻量级剪贴板复制函数
54
+ import XEClipboard from "xe-clipboard";
44
55
  import { DatePicker } from "ant-design-vue";
45
56
  import { ValidationProvider } from "vee-validate";
46
57
  import moment from "moment";
@@ -154,6 +165,28 @@ export default {
154
165
  change() {
155
166
  this.$emit("change");
156
167
  },
168
+ onContextmenu(event, currentValue) {
169
+ this.$contextmenu({
170
+ items: [
171
+ {
172
+ icon: 'ant-design:folder-open-filled',
173
+ label: "复制",
174
+ onClick: () => {
175
+ if (XEClipboard.copy(currentValue)) {
176
+ VXETable.modal.message({
177
+ content: "已复制到剪贴板!",
178
+ status: "success",
179
+ });
180
+ }
181
+ }
182
+ }
183
+ ],
184
+ event,
185
+ zIndex: 100,
186
+ minWidth: 150
187
+ });
188
+ return false;
189
+ }
157
190
  },
158
191
  };
159
192
  </script>
@@ -30,12 +30,23 @@
30
30
  {{ v.errors[0] }}
31
31
  </div>
32
32
  </ValidationProvider>
33
- <span v-else>{{ currentValue }}</span>
33
+ <Tooltip placement="topLeft" v-else>
34
+ <template slot="title">
35
+ {{ currentValue }}
36
+ </template>
37
+ <span @contextmenu.prevent="(event) => onContextmenu(event, currentValue)">
38
+ {{ currentValue }}
39
+ </span>
40
+ </Tooltip>
34
41
  </div>
35
42
  </div>
36
43
  </template>
37
44
 
38
- <script>
45
+ <script>
46
+ //VXETable插件
47
+ import VXETable from "vxe-table";
48
+ //轻量级剪贴板复制函数
49
+ import XEClipboard from "xe-clipboard";
39
50
  import moment from "moment";
40
51
  import { TimePicker } from "ant-design-vue";
41
52
  import { ValidationProvider } from "vee-validate";
@@ -124,6 +135,28 @@ export default {
124
135
  change() {
125
136
  this.$emit('change')
126
137
  },
138
+ onContextmenu(event, currentValue) {
139
+ this.$contextmenu({
140
+ items: [
141
+ {
142
+ icon: 'ant-design:folder-open-filled',
143
+ label: "复制",
144
+ onClick: () => {
145
+ if (XEClipboard.copy(currentValue)) {
146
+ VXETable.modal.message({
147
+ content: "已复制到剪贴板!",
148
+ status: "success",
149
+ });
150
+ }
151
+ }
152
+ }
153
+ ],
154
+ event,
155
+ zIndex: 100,
156
+ minWidth: 150
157
+ });
158
+ return false;
159
+ }
127
160
  },
128
161
  };
129
162
  </script>
@@ -57,7 +57,7 @@ service.interceptors.response.use(
57
57
  return response.data
58
58
  }
59
59
  if (res.code == 60001) {
60
- return new Promise((resolve, reject) => {
60
+ return new Promise(() => {
61
61
  let inputVal = '';
62
62
  Modal.info({
63
63
  zIndex: 3100,
@@ -97,8 +97,8 @@ service.interceptors.response.use(
97
97
  ]);
98
98
  },
99
99
  onOk() {
100
- // 返回登录页
101
- store.dispatch('logOut')
100
+ // 返回控制台并清空全部标签页
101
+ store.dispatch('goWorkbench')
102
102
  }
103
103
  });
104
104
  }
@@ -117,6 +117,10 @@ service.interceptors.response.use(
117
117
  return Promise.reject(error)
118
118
  }
119
119
  },
120
+ onCancel() {
121
+ // 返回控制台并清空全部标签页
122
+ store.dispatch('goWorkbench')
123
+ }
120
124
  });
121
125
  })
122
126
  }
@@ -65,11 +65,24 @@ export default new Vuex.Store({
65
65
  visible: !loopField.hidden,
66
66
  filters: loopField.isFilter,
67
67
  sortable: loopField.isSortable,
68
- controlType: loopField.controlType
68
+ controlType: loopField.controlType,
69
+ edit:loopField.edit
70
+ }
71
+ //页面状态控制
72
+ if(loopField.editStates){
73
+ tempField['editStates'] = loopField.editStates.split(',')
74
+ }
75
+ //单据状态控制
76
+ if(loopField.editStatuss){
77
+ tempField['editStatuss'] = loopField.editStatuss.split(',')
69
78
  }
70
79
  let extraInfo = loopField.extraInfo
71
80
  ? JSON.parse(loopField.extraInfo)
72
81
  : ''
82
+ //存在额外参数,就赋值
83
+ if(extraInfo){
84
+ tempField = XEUtils.assign(extraInfo,tempField)
85
+ }
73
86
  if (tempField.controlType === controlType.select) {
74
87
  tempField['dataSource'] = XEUtils.filter(
75
88
  data.info.dictItems,
@@ -169,6 +182,12 @@ export default new Vuex.Store({
169
182
  reject(error)
170
183
  })
171
184
  })
185
+ },
186
+ // 固定返回工作台,并根据条件决定是否关闭其余标签
187
+ goWorkbench({ commit }, tabsAllClose) {
188
+ if(window.$wujie){
189
+ window.$wujie.bus.$emit('subAppGoWorkbench', tabsAllClose==false?false:true)
190
+ }
172
191
  }
173
192
  },
174
193
  modules:{},