doway-coms 1.6.73 → 1.6.75

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": "doway-coms",
3
- "version": "1.6.73",
3
+ "version": "1.6.75",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -0,0 +1,8 @@
1
+ // 导入组件,组件必须声明 name
2
+ import AuditsList from './src/index.vue';
3
+ // 为组件提供 install 安装方法,供按需引入
4
+ AuditsList.install = function(Vue) {
5
+ Vue.component(AuditsList.name, AuditsList);
6
+ };
7
+ // 默认导出组件
8
+ export default AuditsList;
@@ -0,0 +1,198 @@
1
+ <template>
2
+ <div>
3
+ <div class="icon" @click="showModal = !showModal">
4
+ <a-icon type="edit" style="font-size: 30px; color: #fff" />
5
+ </div>
6
+ <vxe-modal
7
+ v-model="showModal"
8
+ :height="600"
9
+ :width="300"
10
+ :zIndex="1000"
11
+ :showHeader="false"
12
+ :mask="false"
13
+ :mask-closable="true"
14
+ :position="{
15
+ left: '78%',
16
+ top: '15%'
17
+ }"
18
+ destroy-on-close
19
+ >
20
+ <div class="history" v-if="historyList.length>0">
21
+ <div class="title">修改记录</div>
22
+ <div
23
+ class="box"
24
+ v-for="(item,index) in historyList"
25
+ :key="index"
26
+ @click="historyData(item)"
27
+ >
28
+ <div class="item">
29
+ <div
30
+ class="status"
31
+ :style="{color:textColor(item.logOperation)}"
32
+ >{{item.logOperation|filterData}}</div>
33
+ <div class="time">{{item.createTime}}</div>
34
+ <div class="name">{{item.createUserName}}</div>
35
+ </div>
36
+ <div class="divider">
37
+ <div></div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <div v-else class="history">暂无数据</div>
42
+ </vxe-modal>
43
+ </div>
44
+ </template>
45
+
46
+ <script>
47
+ export default {
48
+ name: "auditsList",
49
+ props: {
50
+ formId: {
51
+ type: String
52
+ },
53
+ historyList:{
54
+ }
55
+ },
56
+ components: {},
57
+ watch: {
58
+
59
+ },
60
+ filters: {
61
+ filterData(val) {
62
+ switch (val) {
63
+ case "update":
64
+ return "修改";
65
+ case "add":
66
+ return "新增";
67
+ default:
68
+ return val;
69
+ }
70
+ }
71
+ },
72
+ mounted() {},
73
+ data() {
74
+ return {
75
+ showModal: false,
76
+ };
77
+ },
78
+ methods: {
79
+ historyData(val) {
80
+ this.$emit("historyData", val);
81
+ },
82
+ textColor(val) {
83
+ switch (val) {
84
+ case "add":
85
+ return "green";
86
+ case "update":
87
+ return "orange";
88
+ }
89
+ }
90
+ }
91
+ };
92
+ </script>
93
+
94
+ <style lang="less" scoped>
95
+ .icon {
96
+ position: fixed;
97
+ top: 46%;
98
+ right: 5px;
99
+ z-index: 100;
100
+ cursor: pointer;
101
+ width: 40px;
102
+ height: 40px;
103
+ display: flex;
104
+ justify-content: center;
105
+ align-items: center;
106
+ border-radius: 5px;
107
+ background: #089def;
108
+ }
109
+ ::v-deep .vxe-modal--wrapper .vxe-modal--content {
110
+ padding: 0;
111
+ }
112
+ .history {
113
+ width: 100%;
114
+ height: 100%;
115
+ overflow-x: hidden;
116
+ overflow-y: auto;
117
+ .title{
118
+ text-align: center;
119
+ padding: 10px;
120
+ font-size: 15px;
121
+ font-weight: bold;
122
+ }
123
+ .box {
124
+ .item {
125
+ height: 40px;
126
+ max-height: 40px;
127
+ display: flex;
128
+ cursor: pointer;
129
+ .time {
130
+ flex: 2.5;
131
+ display: flex;
132
+ justify-content: center;
133
+ align-items: center;
134
+ }
135
+ .status {
136
+ flex: 1;
137
+ display: flex;
138
+ justify-content: center;
139
+ align-items: center;
140
+ }
141
+ .name {
142
+ flex: 1;
143
+ display: flex;
144
+ justify-content: center;
145
+ align-items: center;
146
+ }
147
+ }
148
+ .item:hover {
149
+ background: #e3e5e7;
150
+ transition: all 0.5s;
151
+ }
152
+ .divider{
153
+ height: 5px;
154
+ max-height: 5px;
155
+ display: flex;
156
+ justify-content: center;
157
+ align-items: center;
158
+ div{
159
+ width: 180px;
160
+ height: 1px;
161
+ background: #eee;
162
+ }
163
+ }
164
+ }
165
+ }
166
+ /*滚动条整体部分*/
167
+ .history::-webkit-scrollbar {
168
+ width: 5px;
169
+ height: 5px;
170
+ z-index: 10;
171
+ }
172
+ /*滚动条的轨道*/
173
+ .history::-webkit-scrollbar-track {
174
+ background-color: #ffffff;
175
+ z-index: 10;
176
+ }
177
+ /*滚动条里面的小方块,能向上向下移动*/
178
+ .history::-webkit-scrollbar-thumb {
179
+ background-color: #bfbfbf;
180
+ border-radius: 5px;
181
+ border: 1px solid #f1f1f1;
182
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
183
+ z-index: 10;
184
+ }
185
+ .history::-webkit-scrollbar-thumb:hover {
186
+ background-color: #a8a8a8;
187
+ z-index: 10;
188
+ }
189
+ .history::-webkit-scrollbar-thumb:active {
190
+ background-color: #787878;
191
+ z-index: 10;
192
+ }
193
+ /*边角,即两个滚动条的交汇处*/
194
+ .history::-webkit-scrollbar-corner {
195
+ background-color: #ffffff;
196
+ z-index: 10;
197
+ }
198
+ </style>
@@ -107,26 +107,7 @@ export default {
107
107
  }
108
108
  },
109
109
  created() {
110
- this.adjustUserDefineColumns = this.userDefineColumns;
111
- // 设置唯一标识,用于保存时找到字段并重新排序
112
- this.adjustUserDefineColumns.forEach((x, index)=> x.currentKey = index + x.field)
113
- this.columns = [];
114
- this.adjustUserDefineColumns.forEach((item) => {
115
- // 去除操作列和序号、多选框列
116
- if (item.field === "operation" || item.field == undefined) {
117
- return;
118
- }
119
- const column = {
120
- currentKey: item.currentKey,
121
- field: item.field,
122
- title: item.title,
123
- visible: item.visible,
124
- width: item.width,
125
- filters: item.filters,
126
- order: item.order,
127
- }
128
- this.columns.push(column);
129
- })
110
+ this.setColumnsOptions()
130
111
  },
131
112
  mounted() {
132
113
  // 初始排序数组
@@ -134,6 +115,28 @@ export default {
134
115
  this.setOptions()
135
116
  },
136
117
  methods: {
118
+ setColumnsOptions() {
119
+ this.adjustUserDefineColumns = this.userDefineColumns;
120
+ // 设置唯一标识,用于保存时找到字段并重新排序
121
+ this.adjustUserDefineColumns.forEach((x, index)=> x.currentKey = index + x.field)
122
+ this.columns = [];
123
+ this.adjustUserDefineColumns.forEach((item) => {
124
+ // 去除操作列和序号、多选框列
125
+ if (item.field === "operation" || item.field == undefined) {
126
+ return;
127
+ }
128
+ const column = {
129
+ currentKey: item.currentKey,
130
+ field: item.field,
131
+ title: item.title,
132
+ visible: item.visible,
133
+ width: item.width,
134
+ filters: item.filters,
135
+ order: item.order,
136
+ }
137
+ this.columns.push(column);
138
+ })
139
+ },
137
140
  // 配置方法
138
141
  setOptions() {
139
142
  var vm = this
@@ -204,6 +207,14 @@ export default {
204
207
  })
205
208
  saveUserModuleDataFieldApi(postData)
206
209
  .then(res => {
210
+ // 更改columns序号
211
+ // vm.columns.forEach(column => {
212
+ // let tempObject = postData.fields.find(x => x.field == column.field)
213
+ // if (tempObject) {
214
+ // column.sort = tempObject.sort
215
+ // }
216
+ // })
217
+ // console.log('1',vm.columns);
207
218
  // 返回表格组件触发更新
208
219
  vm.$emit('saveSeqConfig',postData, res.content)
209
220
  })
@@ -101,6 +101,7 @@
101
101
  :height="height"
102
102
  :userDefineColumns="userDefineColumns"
103
103
  ref="baseAdjustGridView"
104
+ @saveSeqConfig="saveSeqConfig"
104
105
  />
105
106
  </template>
106
107
  <div @click="clickHeader" v-if="moduleCode && dataCode" >
@@ -741,7 +742,7 @@ export default {
741
742
  props: {
742
743
  isSeqPopover: {
743
744
  type: Boolean,
744
- default: true,
745
+ default: false,
745
746
  },
746
747
  showOverFlow: {
747
748
  type: Boolean,
@@ -1867,9 +1868,9 @@ export default {
1867
1868
  let tableCollectColumn = this.$refs.baseGrid.getTableColumn().collectColumn;
1868
1869
  // 表格排序信息更新
1869
1870
  XEUtils.arrayEach(tableCollectColumn, (loopCol) => {
1870
- const find = XEUtils.find(emitColumns, item => loopCol.field === item.field)
1871
+ const find = XEUtils.find(emitColumns.fields, item => loopCol.field === item.field)
1871
1872
  if (find) {
1872
- loopCol.sort = find.sort
1873
+ loopCol.params.sort = find.sort
1873
1874
  }
1874
1875
  })
1875
1876
  //设置表格顺序
@@ -1878,9 +1879,11 @@ export default {
1878
1879
  (p) => p.params.sort
1879
1880
  );
1880
1881
  // 更新表格
1881
- vm.$refs.baseGrid.reloadColumn(tableCollectColumn);
1882
+ this.$refs.baseGrid.reloadColumn(tableCollectColumn)
1883
+ this.userDefineColumns = this.tableCollectColumn
1884
+ // this.$refs.baseAdjustGridView.setColumnsOptions()
1882
1885
  //清空store缓存
1883
- vm.$store.commit(
1886
+ this.$store.commit(
1884
1887
  "SET_MODULE_VIEW_INFO",{
1885
1888
  moduleCode:this.moduleCode,
1886
1889
  info: resData