bl-common-vue3 3.8.55 → 3.8.57
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 +4 -3
- package/src/common/utils/util.js +4 -4
- package/src/components/ApprovalDetail/index.vue +2 -2
- package/src/components/ApprovalDetail/modules/ApprovalAddComment.vue +4 -4
- package/src/components/ApprovalDetail/modules/ApprovalOpinionInfo.vue +4 -4
- package/src/components/BlPhoneInput/index.vue +2 -2
- package/src/components/BlTinymceEditor/index.vue +3 -2
- package/src/components/ChooseHousingModal/index.vue +4 -4
- package/src/components/ChooseHousingResources/index.vue +4 -4
- package/src/components/ChooseOrgMember/index.vue +9 -9
- package/src/components/ChoosePropertyResources/index.vue +5 -5
- package/src/components/ColumnSetting/index.vue +4 -4
- package/src/components/CustomTable/components/UrlSelect/index.vue +3 -3
- package/src/components/CustomTable/components/UrlTreeSelect/index.vue +2 -2
- package/src/components/CustomTable/index.vue +23 -23
- package/src/components/DepartmentPositionModal/index.vue +2 -2
- package/src/components/ExtraFieldsItem/index.vue +2 -2
- package/src/components/ExtraManage/components/ExtraManageEdit.vue +3 -3
- package/src/components/ExtraManage/index.vue +2 -2
- package/src/components/PublicExtensionField/components/ExtraManageEdit.vue +3 -3
- package/src/components/PublicExtensionField/index.vue +2 -2
- package/src/components/ViewEnergyList/index.vue +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bl-common-vue3",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.57",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "index.js",
|
|
6
6
|
"description": "bailing vue3 common components lib",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"vue": "^3.3.7",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"xlsx": "^0.17.0",
|
|
34
|
-
"tinymce": "^
|
|
35
|
-
"@tinymce/tinymce-vue": "^
|
|
34
|
+
"tinymce": "^8.3.2",
|
|
35
|
+
"@tinymce/tinymce-vue": "^6.3.0",
|
|
36
36
|
"vuedraggable": "^4.1.0",
|
|
37
37
|
"file-saver": "^2.0.5",
|
|
38
38
|
"style-resources-loader": "^1.5.0"
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@vue/cli-service": "~4.5.13",
|
|
46
46
|
"@vue/compiler-sfc": "^3.0.0",
|
|
47
47
|
"babel-eslint": "^10.1.0",
|
|
48
|
+
"babel-plugin-lodash": "^3.3.4",
|
|
48
49
|
"eslint": "^6.7.2",
|
|
49
50
|
"eslint-plugin-vue": "^7.0.0"
|
|
50
51
|
},
|
package/src/common/utils/util.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Modal, notification } from "ant-design-vue";
|
|
2
2
|
import { createVNode } from "vue";
|
|
3
3
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
|
4
|
-
import _ from "lodash";
|
|
5
4
|
import i18n, {t, loadLanguageAsync} from "../../locale";
|
|
6
5
|
import shareds from "./shared";
|
|
6
|
+
import { cloneDeep, isEmpty } from "lodash";
|
|
7
7
|
|
|
8
8
|
const utils = {
|
|
9
9
|
numberReg: /^\d+(\.\d+)?$/, // 数字验证正则
|
|
@@ -196,13 +196,13 @@ const utils = {
|
|
|
196
196
|
if (!utils.ORG_OPTIONS || !utils.ORG_OPTIONS?.length) {
|
|
197
197
|
utils.ORG_OPTIONS = utils.getCommonLocal("ORG_OPTIONS");
|
|
198
198
|
}
|
|
199
|
-
return
|
|
199
|
+
return cloneDeep(utils.ORG_OPTIONS)
|
|
200
200
|
},
|
|
201
201
|
getAreaUnit: () => {
|
|
202
202
|
return utils.areaUnit ? utils.areaUnit : utils.getCommonLocal('basicConfig')?.system_area_unit || '㎡';
|
|
203
203
|
},
|
|
204
204
|
getBasicConfigI18n: () => {
|
|
205
|
-
return
|
|
205
|
+
return isEmpty(utils.basicConfigI18n) ? utils.getCommonLocal('basicConfigI18n') : utils.basicConfigI18n;
|
|
206
206
|
},
|
|
207
207
|
getAllOrgBranch: () => {
|
|
208
208
|
return utils.getCommonLocal('allOrgBranch');
|
|
@@ -480,7 +480,7 @@ const utils = {
|
|
|
480
480
|
getDataByRequest().then((info) => {
|
|
481
481
|
utils.dictMenuData[alias] = info;
|
|
482
482
|
if (returnType == 'object') {
|
|
483
|
-
let data =
|
|
483
|
+
let data = cloneDeep(utils.dictMenuData[alias]);
|
|
484
484
|
Object.keys(data).forEach((keys) => {
|
|
485
485
|
let optionsList = data[keys];
|
|
486
486
|
let sortList = optionsList.sort((a, b) => a.sort - b.sort);
|
|
@@ -586,6 +586,7 @@
|
|
|
586
586
|
</template>
|
|
587
587
|
|
|
588
588
|
<script>
|
|
589
|
+
import { isEmpty } from "lodash";
|
|
589
590
|
import {
|
|
590
591
|
defineComponent,
|
|
591
592
|
reactive,
|
|
@@ -625,7 +626,6 @@ const colorList = {
|
|
|
625
626
|
};
|
|
626
627
|
import CommentList from "./modules/ApprovalCommentList.vue";
|
|
627
628
|
import HandleApproval from "./modules/ApprovalHandleApproval.vue";
|
|
628
|
-
import _ from "lodash";
|
|
629
629
|
import TransferReview from "./modules/ApprovalTransferReview.vue";
|
|
630
630
|
import SendBack from "./modules/ApprovalSendBack.vue";
|
|
631
631
|
import { t } from "../../locale";
|
|
@@ -866,7 +866,7 @@ export default defineComponent({
|
|
|
866
866
|
extra: {},
|
|
867
867
|
},
|
|
868
868
|
success: (res) => {
|
|
869
|
-
if (!
|
|
869
|
+
if (!isEmpty(res.info)) {
|
|
870
870
|
state.sign_url = res.info.sign_url || {};
|
|
871
871
|
}
|
|
872
872
|
},
|
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
</template>
|
|
127
127
|
|
|
128
128
|
<script>
|
|
129
|
+
import { uniqWith, uniqBy, sortBy } from "lodash";
|
|
129
130
|
import { onMounted, reactive, toRefs, ref } from "vue";
|
|
130
131
|
import {
|
|
131
132
|
CloseCircleFilled,
|
|
@@ -134,7 +135,6 @@ import {
|
|
|
134
135
|
DeleteOutlined,
|
|
135
136
|
} from "@ant-design/icons-vue";
|
|
136
137
|
import { message } from "ant-design-vue";
|
|
137
|
-
import _ from "lodash";
|
|
138
138
|
import MentionUser from "./ApprovalMentionUser.vue";
|
|
139
139
|
import utils from "../../../common/utils/util";
|
|
140
140
|
|
|
@@ -197,7 +197,7 @@ export default {
|
|
|
197
197
|
state.comment_word = state.comment_word + item.label + " ";
|
|
198
198
|
state.mention_user.push(item);
|
|
199
199
|
//数组去重
|
|
200
|
-
const uniqueArray =
|
|
200
|
+
const uniqueArray = uniqWith(
|
|
201
201
|
state.mention_user,
|
|
202
202
|
(a, b) => a.value === b.value
|
|
203
203
|
);
|
|
@@ -412,8 +412,8 @@ export default {
|
|
|
412
412
|
|
|
413
413
|
let lists = [];
|
|
414
414
|
console.log(indexs, "indexs");
|
|
415
|
-
let indexsssss =
|
|
416
|
-
indexsssss =
|
|
415
|
+
let indexsssss = uniqBy(indexs, "start");
|
|
416
|
+
indexsssss = sortBy(indexsssss, "start");
|
|
417
417
|
let stepIndex = 0;
|
|
418
418
|
console.log(indexsssss, "indexs");
|
|
419
419
|
console.log(stepIndex, "stepIndex");
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
</template>
|
|
86
86
|
|
|
87
87
|
<script>
|
|
88
|
+
import { uniqWith, uniqBy, sortBy } from "lodash";
|
|
88
89
|
import { computed, onMounted, reactive, toRefs, ref, watch } from "vue";
|
|
89
90
|
import {
|
|
90
91
|
CloseCircleFilled,
|
|
@@ -93,7 +94,6 @@ import {
|
|
|
93
94
|
DeleteOutlined,
|
|
94
95
|
} from "@ant-design/icons-vue";
|
|
95
96
|
import { message } from "ant-design-vue";
|
|
96
|
-
import _ from "lodash";
|
|
97
97
|
import utils from "../../../common/utils/util";
|
|
98
98
|
|
|
99
99
|
export default {
|
|
@@ -153,7 +153,7 @@ export default {
|
|
|
153
153
|
state.comment_word = state.comment_word + item.label + " ";
|
|
154
154
|
state.mention_user.push(item);
|
|
155
155
|
//数组去重
|
|
156
|
-
const uniqueArray =
|
|
156
|
+
const uniqueArray = uniqWith(
|
|
157
157
|
state.mention_user,
|
|
158
158
|
(a, b) => a.value === b.value
|
|
159
159
|
);
|
|
@@ -383,8 +383,8 @@ export default {
|
|
|
383
383
|
|
|
384
384
|
let lists = [];
|
|
385
385
|
console.log(indexs, "indexs");
|
|
386
|
-
let indexsssss =
|
|
387
|
-
indexsssss =
|
|
386
|
+
let indexsssss = uniqBy(indexs, "start");
|
|
387
|
+
indexsssss = sortBy(indexsssss, "start");
|
|
388
388
|
let stepIndex = 0;
|
|
389
389
|
console.log(indexsssss, "indexs");
|
|
390
390
|
console.log(stepIndex, "stepIndex");
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
</template>
|
|
40
40
|
<script>
|
|
41
|
+
import { isEmpty } from "lodash";
|
|
41
42
|
import {defineComponent, reactive, toRefs, ref, nextTick, watch, computed} from "vue";
|
|
42
43
|
import { Input, Select, SelectOption } from "ant-design-vue";
|
|
43
44
|
import {t, loadLanguageAsync} from "../../locale";
|
|
44
45
|
import utils from "../../common/utils/util";
|
|
45
|
-
import _ from "lodash";
|
|
46
46
|
export default defineComponent({
|
|
47
47
|
name: "BlPhoneInput",
|
|
48
48
|
components: {
|
|
@@ -110,7 +110,7 @@ export default defineComponent({
|
|
|
110
110
|
});
|
|
111
111
|
|
|
112
112
|
const phoneNumberPropsComputed = computed(() => {
|
|
113
|
-
return
|
|
113
|
+
return isEmpty(props.phoneNumberProps) ? {
|
|
114
114
|
placeholder: t('BlPhoneInput.index.598206-0'),
|
|
115
115
|
disabled: false,
|
|
116
116
|
size: "default",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="tiny-mce-editor" :key="refreshKey">
|
|
3
|
-
<TinymceVueEditor v-model="content" :init="tinyInitConfig" :disabled="disabled"></TinymceVueEditor>
|
|
3
|
+
<TinymceVueEditor v-model="content" :init="tinyInitConfig" licenseKey="gpl" :disabled="disabled"></TinymceVueEditor>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { computed, defineComponent, onMounted, reactive, ref, watch, nextTick, onUnmounted } from "vue";
|
|
9
9
|
import { message } from "ant-design-vue";
|
|
10
10
|
|
|
11
|
+
// 引入tinymce,否则报错:The editor is disabled because the API key could not be validated by the API key validation server.
|
|
11
12
|
import tinymce from "tinymce/tinymce";
|
|
12
13
|
import TinymceVueEditor from "@tinymce/tinymce-vue";
|
|
13
14
|
|
|
@@ -83,6 +84,7 @@ export default defineComponent({
|
|
|
83
84
|
},
|
|
84
85
|
emits: ["update:modelValue", "request"],
|
|
85
86
|
setup(props, { emit }) {
|
|
87
|
+
// license_key: 'gpl' TinyMCE 8 强制要求配置许可证密钥,即使使用社区版(GPL)
|
|
86
88
|
const state = reactive({
|
|
87
89
|
hasChange: false,
|
|
88
90
|
});
|
|
@@ -300,7 +302,6 @@ export default defineComponent({
|
|
|
300
302
|
});
|
|
301
303
|
|
|
302
304
|
onMounted(() => {
|
|
303
|
-
tinymce.init({});
|
|
304
305
|
});
|
|
305
306
|
|
|
306
307
|
onUnmounted(() => {
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script>
|
|
58
|
+
import { cloneDeep } from "lodash";
|
|
58
59
|
import {
|
|
59
60
|
defineComponent, reactive, watch, toRefs, computed,
|
|
60
61
|
} from "vue";
|
|
61
62
|
import {Modal, message} from "ant-design-vue";
|
|
62
63
|
import ChooseHousingResources from "../ChooseHousingResources/index.vue";
|
|
63
|
-
import _ from "lodash";
|
|
64
64
|
import {t, loadLanguageAsync} from "../../locale";
|
|
65
65
|
import utils from "../../common/utils/util";
|
|
66
66
|
|
|
@@ -312,7 +312,7 @@ export default defineComponent({
|
|
|
312
312
|
|
|
313
313
|
const getResult = (data) => {
|
|
314
314
|
state.loading = false;
|
|
315
|
-
state.result =
|
|
315
|
+
state.result = cloneDeep(data);
|
|
316
316
|
};
|
|
317
317
|
|
|
318
318
|
const handleRequest = (emitObj) => {
|
|
@@ -334,10 +334,10 @@ export default defineComponent({
|
|
|
334
334
|
if (!canNext) {
|
|
335
335
|
message.warning(t('ChooseHousingModal.index.582040-2', [props.maxNum,maxNameProps.value]))
|
|
336
336
|
} else {
|
|
337
|
-
emit("submitResult",
|
|
337
|
+
emit("submitResult", cloneDeep(state.result));
|
|
338
338
|
}
|
|
339
339
|
} else {
|
|
340
|
-
emit("submitResult",
|
|
340
|
+
emit("submitResult", cloneDeep(state.result));
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
343
|
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
</template>
|
|
148
148
|
|
|
149
149
|
<script>
|
|
150
|
+
import { cloneDeep } from "lodash";
|
|
150
151
|
import {
|
|
151
152
|
computed,
|
|
152
153
|
defineComponent,
|
|
@@ -164,7 +165,6 @@ import {
|
|
|
164
165
|
import { LockOutlined, GoldenFilled } from "@ant-design/icons-vue";
|
|
165
166
|
import { message, Tree, Alert, Tooltip, Spin } from "ant-design-vue";
|
|
166
167
|
import BlIcon from "../BLIcon/index.js";
|
|
167
|
-
import _ from "lodash";
|
|
168
168
|
import utils from "../../common/utils/util";
|
|
169
169
|
import {ROOM_TYPE_ICONS} from "../../common/utils/constant";
|
|
170
170
|
import {t, loadLanguageAsync} from "../../locale";
|
|
@@ -494,7 +494,7 @@ export default defineComponent({
|
|
|
494
494
|
* @returns {Array}
|
|
495
495
|
*/
|
|
496
496
|
const cloneTreeData = (list = []) => {
|
|
497
|
-
return
|
|
497
|
+
return cloneDeep(toRaw(list || []));
|
|
498
498
|
};
|
|
499
499
|
|
|
500
500
|
/**
|
|
@@ -938,7 +938,7 @@ export default defineComponent({
|
|
|
938
938
|
);
|
|
939
939
|
|
|
940
940
|
const emitResult = (result) => {
|
|
941
|
-
let _result =
|
|
941
|
+
let _result = cloneDeep(result);
|
|
942
942
|
if (_result.villageList.length) {
|
|
943
943
|
_result.villageList.map((v) => {
|
|
944
944
|
let _build = [];
|
|
@@ -2315,7 +2315,7 @@ export default defineComponent({
|
|
|
2315
2315
|
};
|
|
2316
2316
|
// 获取项目树列表
|
|
2317
2317
|
const getVillageTreeList = (villageList, level = 1, parentKey) => {
|
|
2318
|
-
let _villageList =
|
|
2318
|
+
let _villageList = cloneDeep(villageList);
|
|
2319
2319
|
if (props.defaultShowVillageIds.length) {
|
|
2320
2320
|
_villageList = _villageList.filter((v) =>
|
|
2321
2321
|
props.defaultShowVillageIds.includes(v.id)
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
</template>
|
|
162
162
|
|
|
163
163
|
<script>
|
|
164
|
+
import { cloneDeep } from "lodash";
|
|
164
165
|
import { defineComponent, computed, watch, reactive, toRefs, toRaw } from "vue";
|
|
165
166
|
import {
|
|
166
167
|
PartitionOutlined,
|
|
@@ -182,7 +183,6 @@ import {
|
|
|
182
183
|
} from "ant-design-vue";
|
|
183
184
|
import {t, loadLanguageAsync} from "../../locale";
|
|
184
185
|
import utils from "../../common/utils/util";
|
|
185
|
-
import _ from "lodash";
|
|
186
186
|
|
|
187
187
|
export default defineComponent({
|
|
188
188
|
name: "ChooseOrgMember",
|
|
@@ -383,14 +383,14 @@ export default defineComponent({
|
|
|
383
383
|
},
|
|
384
384
|
});
|
|
385
385
|
} else {
|
|
386
|
-
state.showList =
|
|
386
|
+
state.showList = cloneDeep(state.allList);
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
watch(
|
|
390
390
|
() => state.searchValue,
|
|
391
391
|
(val) => {
|
|
392
392
|
if (!val && state.currentCrumbId == 0) {
|
|
393
|
-
state.showList =
|
|
393
|
+
state.showList = cloneDeep(state.allList);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
);
|
|
@@ -477,7 +477,7 @@ export default defineComponent({
|
|
|
477
477
|
if (state.searchValue) {
|
|
478
478
|
state.searchValue = "";
|
|
479
479
|
} else {
|
|
480
|
-
state.showList =
|
|
480
|
+
state.showList = cloneDeep(state.allList);
|
|
481
481
|
}
|
|
482
482
|
} else {
|
|
483
483
|
const index = state.crumbList.findIndex(
|
|
@@ -615,7 +615,7 @@ export default defineComponent({
|
|
|
615
615
|
personal: res.data || [],
|
|
616
616
|
subcat: [],
|
|
617
617
|
}
|
|
618
|
-
state.allList =
|
|
618
|
+
state.allList = cloneDeep(state.showList);
|
|
619
619
|
state.loading = false;
|
|
620
620
|
replaceCheckedById(res.list);
|
|
621
621
|
return
|
|
@@ -628,14 +628,14 @@ export default defineComponent({
|
|
|
628
628
|
id: 0,
|
|
629
629
|
sub_total: res.list.length,
|
|
630
630
|
}
|
|
631
|
-
state.allList =
|
|
631
|
+
state.allList = cloneDeep(state.showList);
|
|
632
632
|
state.loading = false;
|
|
633
633
|
replaceCheckedById(res.list);
|
|
634
634
|
return
|
|
635
635
|
}
|
|
636
636
|
state.showList = res.list[0];
|
|
637
637
|
const goNext = () => {
|
|
638
|
-
state.allList =
|
|
638
|
+
state.allList = cloneDeep(state.showList);
|
|
639
639
|
state.loading = false;
|
|
640
640
|
replaceCheckedById(res.list);
|
|
641
641
|
}
|
|
@@ -649,8 +649,8 @@ export default defineComponent({
|
|
|
649
649
|
|
|
650
650
|
const handleCheckedUserList = () => {
|
|
651
651
|
let { user = [], department = [] } = props.checkedList;
|
|
652
|
-
state.userChecked =
|
|
653
|
-
state.departmentChecked =
|
|
652
|
+
state.userChecked = cloneDeep(user);
|
|
653
|
+
state.departmentChecked = cloneDeep(department);
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
const handleCheckAll = () => {
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
</template>
|
|
84
84
|
|
|
85
85
|
<script>
|
|
86
|
+
import { cloneDeep } from "lodash";
|
|
86
87
|
import {
|
|
87
88
|
defineComponent,
|
|
88
89
|
nextTick,
|
|
@@ -95,7 +96,6 @@ import {
|
|
|
95
96
|
computed,
|
|
96
97
|
} from "vue";
|
|
97
98
|
import { message, Tree, Alert, Tooltip, Spin } from "ant-design-vue";
|
|
98
|
-
import _ from "lodash";
|
|
99
99
|
import utils from "../../common/utils/util";
|
|
100
100
|
import BlIcon from "../BLIcon/index.js";
|
|
101
101
|
import {t, loadLanguageAsync} from "../../locale";
|
|
@@ -452,7 +452,7 @@ export default defineComponent({
|
|
|
452
452
|
);
|
|
453
453
|
|
|
454
454
|
const emitResult = (result) => {
|
|
455
|
-
let _result =
|
|
455
|
+
let _result = cloneDeep(result);
|
|
456
456
|
CL("emitResult====", _result);
|
|
457
457
|
spinning.value = false;
|
|
458
458
|
emit("changeTreeLoading", false);
|
|
@@ -977,8 +977,8 @@ export default defineComponent({
|
|
|
977
977
|
}
|
|
978
978
|
// 默认选中值
|
|
979
979
|
setDefaultChecked();
|
|
980
|
-
let _treeList =
|
|
981
|
-
let _originData =
|
|
980
|
+
let _treeList = cloneDeep(state.treeList);
|
|
981
|
+
let _originData = cloneDeep(JSON.parse(state.originData));
|
|
982
982
|
// 最终treeList
|
|
983
983
|
emit("getTree", {
|
|
984
984
|
list: _treeList,
|
|
@@ -989,7 +989,7 @@ export default defineComponent({
|
|
|
989
989
|
|
|
990
990
|
// 获取公司树列表
|
|
991
991
|
const getCompanyTreeList = (companyList, level = 1, parentKey) => {
|
|
992
|
-
let _companyList =
|
|
992
|
+
let _companyList = cloneDeep(companyList);
|
|
993
993
|
if (props.defaultShowCompanyIds.length) {
|
|
994
994
|
_companyList = _companyList.filter((v) =>
|
|
995
995
|
props.defaultShowCompanyIds.includes(v.id)
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
</template>
|
|
88
88
|
|
|
89
89
|
<script>
|
|
90
|
+
import { cloneDeep } from "lodash";
|
|
90
91
|
import {defineComponent, reactive, toRefs, watch, createVNode, computed} from "vue";
|
|
91
92
|
import { message, Drawer, Space, Button, InputNumber, Checkbox, RadioGroup, Modal} from "ant-design-vue";
|
|
92
|
-
import _ from 'lodash';
|
|
93
93
|
import draggable from "vuedraggable";
|
|
94
94
|
import {
|
|
95
95
|
HolderOutlined,
|
|
@@ -165,7 +165,7 @@ export default defineComponent({
|
|
|
165
165
|
message.warn(t('ColumnSetting.index.391089-7'));
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
let columnsConfig =
|
|
168
|
+
let columnsConfig = cloneDeep(state.defaultColumns).map((item) => {
|
|
169
169
|
if (item.key == 'action') {
|
|
170
170
|
delete item.width
|
|
171
171
|
}
|
|
@@ -207,7 +207,7 @@ export default defineComponent({
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
const init = () => {
|
|
210
|
-
state.defaultColumns =
|
|
210
|
+
state.defaultColumns = cloneDeep(props.localColumns);
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
const reset = () => {
|
|
@@ -223,7 +223,7 @@ export default defineComponent({
|
|
|
223
223
|
okText: t('common.button.confirm'),
|
|
224
224
|
cancelText: t('common.button.cancel'),
|
|
225
225
|
onOk: () => {
|
|
226
|
-
state.defaultColumns =
|
|
226
|
+
state.defaultColumns = cloneDeep(props.initColumns).map((v) => {
|
|
227
227
|
v.sorter = v.hasSort ? v?.sorter ?? true : false;
|
|
228
228
|
return v;
|
|
229
229
|
});
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
|
+
import { cloneDeep } from "lodash";
|
|
32
33
|
import {computed, defineComponent, useAttrs, ref, onMounted, reactive, watch, toRefs} from 'vue';
|
|
33
34
|
// 单独引入(否则OOM!)
|
|
34
35
|
import { Select } from 'ant-design-vue';
|
|
35
|
-
import _ from "lodash";
|
|
36
36
|
import utils from '../../../../common/utils/util';
|
|
37
37
|
|
|
38
38
|
export default defineComponent({
|
|
@@ -132,7 +132,7 @@ export default defineComponent({
|
|
|
132
132
|
const init = () => {
|
|
133
133
|
if (Array.isArray(props.defaultLabelInValue)) {
|
|
134
134
|
// 多选
|
|
135
|
-
state.labelValue =
|
|
135
|
+
state.labelValue = cloneDeep(props.defaultLabelInValue || []).map((v) => {
|
|
136
136
|
return {
|
|
137
137
|
option: v,
|
|
138
138
|
key: v.value,
|
|
@@ -144,7 +144,7 @@ export default defineComponent({
|
|
|
144
144
|
} else {
|
|
145
145
|
if (props.defaultLabelInValue) {
|
|
146
146
|
state.labelValue = {
|
|
147
|
-
option:
|
|
147
|
+
option: cloneDeep(props.defaultLabelInValue),
|
|
148
148
|
originLabel: props.defaultLabelInValue.name,
|
|
149
149
|
label: props.defaultLabelInValue.name,
|
|
150
150
|
key: props.defaultLabelInValue.value,
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
|
+
import { cloneDeep } from "lodash";
|
|
30
31
|
import {computed, defineComponent, useAttrs, ref, onMounted, reactive, watch, toRefs} from 'vue';
|
|
31
32
|
// 单独引入(否则OOM!)
|
|
32
33
|
import {TreeSelect} from 'ant-design-vue';
|
|
33
|
-
import _ from "lodash";
|
|
34
34
|
import utils from '../../../../common/utils/util';
|
|
35
35
|
|
|
36
36
|
export default defineComponent({
|
|
@@ -177,7 +177,7 @@ export default defineComponent({
|
|
|
177
177
|
const init = () => {
|
|
178
178
|
let defaultValue = [];
|
|
179
179
|
if (Array.isArray(attrs.value) && attrs.value.length > 0) {
|
|
180
|
-
defaultValue =
|
|
180
|
+
defaultValue = cloneDeep(attrs.value);
|
|
181
181
|
} else {
|
|
182
182
|
if (attrs.value || attrs.value === 0) {
|
|
183
183
|
defaultValue = [attrs.value];
|
|
@@ -1237,6 +1237,7 @@
|
|
|
1237
1237
|
</template>
|
|
1238
1238
|
|
|
1239
1239
|
<script>
|
|
1240
|
+
import { cloneDeep, isEmpty } from "lodash";
|
|
1240
1241
|
import {
|
|
1241
1242
|
ref,
|
|
1242
1243
|
reactive,
|
|
@@ -1249,7 +1250,6 @@ import {
|
|
|
1249
1250
|
watch,
|
|
1250
1251
|
onBeforeUnmount,
|
|
1251
1252
|
} from "vue";
|
|
1252
|
-
import _ from "lodash";
|
|
1253
1253
|
import {
|
|
1254
1254
|
Row,
|
|
1255
1255
|
Col,
|
|
@@ -1774,7 +1774,7 @@ export default defineComponent({
|
|
|
1774
1774
|
}
|
|
1775
1775
|
|
|
1776
1776
|
const handleCostTypeChange = (item, value, label, extra) => {
|
|
1777
|
-
let arr =
|
|
1777
|
+
let arr = cloneDeep(value);
|
|
1778
1778
|
handleSearch(item.field , arr)
|
|
1779
1779
|
}
|
|
1780
1780
|
|
|
@@ -1843,7 +1843,7 @@ export default defineComponent({
|
|
|
1843
1843
|
|
|
1844
1844
|
/* 展示在页面上的表格列 */
|
|
1845
1845
|
const realColumns = computed(() => {
|
|
1846
|
-
return
|
|
1846
|
+
return cloneDeep(localColumnsCom.value)
|
|
1847
1847
|
.filter((v) => !v.hidden)
|
|
1848
1848
|
.map((v, index) => {
|
|
1849
1849
|
if (v.sorter) {
|
|
@@ -1879,7 +1879,7 @@ export default defineComponent({
|
|
|
1879
1879
|
};
|
|
1880
1880
|
|
|
1881
1881
|
const exportColumnsTitle = computed(() => {
|
|
1882
|
-
let _realColumns =
|
|
1882
|
+
let _realColumns = cloneDeep(localColumnsCom.value);
|
|
1883
1883
|
let finallyColumns = _realColumns.concat(props.exportExtraColumns);
|
|
1884
1884
|
return finallyColumns.reduce((obj, v) => {
|
|
1885
1885
|
if (v.key !== "action" && !v.exportHidden) {
|
|
@@ -1960,7 +1960,7 @@ export default defineComponent({
|
|
|
1960
1960
|
const handleExportData = (list) => {
|
|
1961
1961
|
let columnIndexObj = {};
|
|
1962
1962
|
let haveSlot = false;
|
|
1963
|
-
|
|
1963
|
+
cloneDeep(realColumns.value).forEach((columnItem, index) => {
|
|
1964
1964
|
// 从后往前处理
|
|
1965
1965
|
let virtualDataIndex = replaceObjDataIndex(columnItem.dataIndex);
|
|
1966
1966
|
if (columnItem.columnType) {
|
|
@@ -2062,7 +2062,7 @@ export default defineComponent({
|
|
|
2062
2062
|
const loadData = (isInit = false) => {
|
|
2063
2063
|
// 使用了 props 数据 props 更新是异步的
|
|
2064
2064
|
nextTick(() => {
|
|
2065
|
-
if (
|
|
2065
|
+
if (isEmpty(props.requestInfo)) return;
|
|
2066
2066
|
state.localLoading = true;
|
|
2067
2067
|
// 刷新的时候清除列表(滚动条会滚动到顶部)
|
|
2068
2068
|
if(props.ClearList){
|
|
@@ -2084,7 +2084,7 @@ export default defineComponent({
|
|
|
2084
2084
|
}
|
|
2085
2085
|
if (
|
|
2086
2086
|
props.requestInfo?.params &&
|
|
2087
|
-
!
|
|
2087
|
+
!isEmpty(props.requestInfo.params)
|
|
2088
2088
|
) {
|
|
2089
2089
|
params = {
|
|
2090
2090
|
...params,
|
|
@@ -2190,7 +2190,7 @@ export default defineComponent({
|
|
|
2190
2190
|
}
|
|
2191
2191
|
params.filters = [...filters, ...filList];
|
|
2192
2192
|
|
|
2193
|
-
let extraInfo =
|
|
2193
|
+
let extraInfo = cloneDeep(state.extraColumns);
|
|
2194
2194
|
params.filters.forEach((item) => {
|
|
2195
2195
|
if (extraInfo.length){
|
|
2196
2196
|
let tempIt = extraInfo.find((it) => it?.key == item.field);
|
|
@@ -2223,7 +2223,7 @@ export default defineComponent({
|
|
|
2223
2223
|
}
|
|
2224
2224
|
});
|
|
2225
2225
|
params.counts = countsParams.value;
|
|
2226
|
-
state.listParams =
|
|
2226
|
+
state.listParams = cloneDeep(params);
|
|
2227
2227
|
emit("handleGetData", state.listParams);
|
|
2228
2228
|
emit("request", {
|
|
2229
2229
|
params: {
|
|
@@ -2262,7 +2262,7 @@ export default defineComponent({
|
|
|
2262
2262
|
}
|
|
2263
2263
|
if(!res?.extra_fields_alias && !state.initSuccess){
|
|
2264
2264
|
state.initSuccess = true;
|
|
2265
|
-
state.initColumns =
|
|
2265
|
+
state.initColumns = cloneDeep(state.defaultColumns);
|
|
2266
2266
|
state.extraColumns = [];
|
|
2267
2267
|
refreshColumns()
|
|
2268
2268
|
}
|
|
@@ -2294,7 +2294,7 @@ export default defineComponent({
|
|
|
2294
2294
|
showTotal: (total) => t("CustomTable.index.074786-32", [total]),
|
|
2295
2295
|
});
|
|
2296
2296
|
|
|
2297
|
-
// table 数据变化 state.tableSort不能使用
|
|
2297
|
+
// table 数据变化 state.tableSort不能使用cloneDeep(sorter)赋值 原因:在headerCell插槽和排序同时存在时点击排序报错Cannot read properties of null (reading 'isCE')
|
|
2298
2298
|
const handleTableChange = (
|
|
2299
2299
|
pagination,
|
|
2300
2300
|
filters,
|
|
@@ -2370,7 +2370,7 @@ export default defineComponent({
|
|
|
2370
2370
|
let columns = [];
|
|
2371
2371
|
let haveConfigColumn = [];
|
|
2372
2372
|
let haveNotConfigColumn = [];
|
|
2373
|
-
let initialColumns =
|
|
2373
|
+
let initialColumns = cloneDeep(state.initColumns);
|
|
2374
2374
|
initialColumns.forEach((item) => {
|
|
2375
2375
|
let haveConfig = configList.find((v) => v.key == item.key);
|
|
2376
2376
|
if (haveConfig) {
|
|
@@ -2459,7 +2459,7 @@ export default defineComponent({
|
|
|
2459
2459
|
if (res?.list?.length) {
|
|
2460
2460
|
getLocalColumnFromConfig(res.list);
|
|
2461
2461
|
} else {
|
|
2462
|
-
state.localColumns =
|
|
2462
|
+
state.localColumns = cloneDeep(state.initColumns).map((v) => {
|
|
2463
2463
|
v.sorter = v.hasSort ? v?.sorter ?? true : false;
|
|
2464
2464
|
return v;
|
|
2465
2465
|
});
|
|
@@ -2473,7 +2473,7 @@ export default defineComponent({
|
|
|
2473
2473
|
},
|
|
2474
2474
|
});
|
|
2475
2475
|
} else {
|
|
2476
|
-
state.localColumns =
|
|
2476
|
+
state.localColumns = cloneDeep(state.initColumns).map((v) => {
|
|
2477
2477
|
v.sorter = v.hasSort ? v?.sorter ?? true : false;
|
|
2478
2478
|
return v;
|
|
2479
2479
|
});
|
|
@@ -2666,7 +2666,7 @@ export default defineComponent({
|
|
|
2666
2666
|
info[keys] = optionInfo;
|
|
2667
2667
|
});
|
|
2668
2668
|
state.dictionaryInfo = info;
|
|
2669
|
-
emit("getDictData",
|
|
2669
|
+
emit("getDictData", cloneDeep(info));
|
|
2670
2670
|
state.hasDictionary = true;
|
|
2671
2671
|
},
|
|
2672
2672
|
});
|
|
@@ -2843,7 +2843,7 @@ export default defineComponent({
|
|
|
2843
2843
|
}
|
|
2844
2844
|
}
|
|
2845
2845
|
}
|
|
2846
|
-
state.filterParams =
|
|
2846
|
+
state.filterParams = cloneDeep(state.filterList);
|
|
2847
2847
|
if (utils.isEnv()) {
|
|
2848
2848
|
console.log('====================' , state.filterParams);
|
|
2849
2849
|
}
|
|
@@ -2865,7 +2865,7 @@ export default defineComponent({
|
|
|
2865
2865
|
}
|
|
2866
2866
|
});
|
|
2867
2867
|
state.refreshKey++;
|
|
2868
|
-
state.filterParams =
|
|
2868
|
+
state.filterParams = cloneDeep(state.filterList);
|
|
2869
2869
|
};
|
|
2870
2870
|
|
|
2871
2871
|
const addAdmin = (field) => {
|
|
@@ -2909,7 +2909,7 @@ export default defineComponent({
|
|
|
2909
2909
|
if (!dict) return [];
|
|
2910
2910
|
let dictInfo = state.dictionaryInfo[dict];
|
|
2911
2911
|
let arr = [];
|
|
2912
|
-
if (!
|
|
2912
|
+
if (!isEmpty(dictInfo)) {
|
|
2913
2913
|
Object.keys(dictInfo).forEach((key) => {
|
|
2914
2914
|
arr.push({
|
|
2915
2915
|
label: utils.i18nMapShow(dictInfo[key] || {}, ["label"], ["label"]),
|
|
@@ -2971,8 +2971,8 @@ export default defineComponent({
|
|
|
2971
2971
|
|
|
2972
2972
|
const getFilterList = async () => {
|
|
2973
2973
|
let columns = props.isCustomSearchColumn
|
|
2974
|
-
?
|
|
2975
|
-
:
|
|
2974
|
+
? cloneDeep(state.localColumns || [])
|
|
2975
|
+
: cloneDeep(state.initColumns || []);
|
|
2976
2976
|
if (props.isCustomSearchColumn) {
|
|
2977
2977
|
columns = columns
|
|
2978
2978
|
.map((v) => {
|
|
@@ -2985,7 +2985,7 @@ export default defineComponent({
|
|
|
2985
2985
|
}
|
|
2986
2986
|
|
|
2987
2987
|
/* 表格带的搜索 */
|
|
2988
|
-
let columnsFilter =
|
|
2988
|
+
let columnsFilter = cloneDeep(
|
|
2989
2989
|
columns?.filter((v) => v.search?.search_type)
|
|
2990
2990
|
).map((v) => {
|
|
2991
2991
|
v.search.field = v?.search?.field || v.dataIndex;
|
|
@@ -3117,7 +3117,7 @@ export default defineComponent({
|
|
|
3117
3117
|
state.localLoading = false;
|
|
3118
3118
|
if (newList.length==0){
|
|
3119
3119
|
state.extraColumns = [];
|
|
3120
|
-
state.initColumns =
|
|
3120
|
+
state.initColumns = cloneDeep(state.defaultColumns);
|
|
3121
3121
|
refreshColumns()
|
|
3122
3122
|
return;
|
|
3123
3123
|
}
|
|
@@ -3497,7 +3497,7 @@ export default defineComponent({
|
|
|
3497
3497
|
if (props.showExtraField && !state.initSuccess) {
|
|
3498
3498
|
return [];
|
|
3499
3499
|
}
|
|
3500
|
-
let temDataSource =
|
|
3500
|
+
let temDataSource = cloneDeep(state.dataSource);
|
|
3501
3501
|
if (state.extraColumns.length>0){
|
|
3502
3502
|
temDataSource = temDataSource.map(item => {
|
|
3503
3503
|
let newItem = {...item}
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
</template>
|
|
181
181
|
|
|
182
182
|
<script>
|
|
183
|
+
import { cloneDeep } from "lodash";
|
|
183
184
|
import {defineComponent, nextTick, reactive, toRefs, watch} from "vue";
|
|
184
185
|
import {
|
|
185
186
|
message,
|
|
@@ -200,7 +201,6 @@ import { TeamOutlined, DownOutlined } from "@ant-design/icons-vue";
|
|
|
200
201
|
import { QuestionCircleOutlined } from "@ant-design/icons-vue";
|
|
201
202
|
import utils from "../../common/utils/util";
|
|
202
203
|
import UserDetail from "../UserDetail/index.vue";
|
|
203
|
-
import _ from "lodash";
|
|
204
204
|
import {t, loadLanguageAsync} from "../../locale";
|
|
205
205
|
|
|
206
206
|
export default defineComponent({
|
|
@@ -546,7 +546,7 @@ export default defineComponent({
|
|
|
546
546
|
);
|
|
547
547
|
getDepartmentUser(false, currentDepartment).then(() => {
|
|
548
548
|
setTimeout(() => {
|
|
549
|
-
state.treeData =
|
|
549
|
+
state.treeData = cloneDeep(state.treeData);
|
|
550
550
|
resolve();
|
|
551
551
|
}, 1000);
|
|
552
552
|
})
|
|
@@ -257,6 +257,7 @@
|
|
|
257
257
|
</template>
|
|
258
258
|
|
|
259
259
|
<script>
|
|
260
|
+
import { cloneDeep } from "lodash";
|
|
260
261
|
import {
|
|
261
262
|
defineComponent,
|
|
262
263
|
reactive,
|
|
@@ -265,7 +266,6 @@ import {
|
|
|
265
266
|
} from "vue";
|
|
266
267
|
import { message } from "ant-design-vue";
|
|
267
268
|
import {PlusOutlined,DownloadOutlined,UploadOutlined,DeleteOutlined} from "@ant-design/icons-vue";
|
|
268
|
-
import _ from "lodash";
|
|
269
269
|
import {t, loadLanguageAsync} from "../../locale";
|
|
270
270
|
import utils from "../../common/utils/util";
|
|
271
271
|
|
|
@@ -382,7 +382,7 @@ export default defineComponent({
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
const init = () => {
|
|
385
|
-
state.data =
|
|
385
|
+
state.data = cloneDeep(props.Objectdata);
|
|
386
386
|
|
|
387
387
|
if(props.type == 1){
|
|
388
388
|
if(state.data.fields_type == 'single_text'){
|
|
@@ -191,6 +191,7 @@
|
|
|
191
191
|
</template>
|
|
192
192
|
|
|
193
193
|
<script>
|
|
194
|
+
import { cloneDeep } from "lodash";
|
|
194
195
|
import {computed, defineComponent, watch, reactive, toRefs, ref} from "vue";
|
|
195
196
|
import {Button, Col, Modal, Form, FormItem, Input, InputNumber, message, Row, Select, Switch} from "ant-design-vue";
|
|
196
197
|
import {t, loadLanguageAsync} from "../../../locale";
|
|
@@ -198,7 +199,6 @@ import utils from "../../../common/utils/util";
|
|
|
198
199
|
const useForm = Form.useForm;
|
|
199
200
|
import draggable from "vuedraggable";
|
|
200
201
|
import { DragOutlined , DeleteOutlined , QuestionCircleOutlined } from "@ant-design/icons-vue";
|
|
201
|
-
import _ from "lodash";
|
|
202
202
|
import TextTip from "../../TextTip/index.vue";
|
|
203
203
|
|
|
204
204
|
export default defineComponent({
|
|
@@ -335,7 +335,7 @@ export default defineComponent({
|
|
|
335
335
|
let requestInfo = props.requestAllInfo.edit;
|
|
336
336
|
let params = requestInfo?.params || props.requestAllParams?.edit || {};
|
|
337
337
|
params.id = props.id;
|
|
338
|
-
let formData =
|
|
338
|
+
let formData = cloneDeep(state.formState);
|
|
339
339
|
if (!props.hasVillageSelect) {
|
|
340
340
|
delete formData.village_id;
|
|
341
341
|
}
|
|
@@ -366,7 +366,7 @@ export default defineComponent({
|
|
|
366
366
|
// 添加
|
|
367
367
|
let requestInfo = props.requestAllInfo.add;
|
|
368
368
|
let params = requestInfo?.params || props.requestAllParams?.add || {};
|
|
369
|
-
let formData =
|
|
369
|
+
let formData = cloneDeep(state.formState);
|
|
370
370
|
if (!props.hasVillageSelect) {
|
|
371
371
|
delete formData.village_id;
|
|
372
372
|
}
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<script>
|
|
57
|
+
import { cloneDeep } from "lodash";
|
|
57
58
|
import {defineComponent, reactive, toRefs, defineAsyncComponent, computed} from "vue";
|
|
58
59
|
import ExtraManageEdit from "./components/ExtraManageEdit.vue";
|
|
59
60
|
import {Drawer, message,} from "ant-design-vue";
|
|
60
61
|
import {t, loadLanguageAsync} from "../../locale";
|
|
61
62
|
import utils from "../../common/utils/util";
|
|
62
|
-
import _ from "lodash";
|
|
63
63
|
const CustomTable = defineAsyncComponent(() =>
|
|
64
64
|
import("../CustomTable/index.vue")
|
|
65
65
|
);
|
|
@@ -229,7 +229,7 @@ export default defineComponent({
|
|
|
229
229
|
fixed: "right",
|
|
230
230
|
},
|
|
231
231
|
];
|
|
232
|
-
let _deepColumns =
|
|
232
|
+
let _deepColumns = cloneDeep(defaultColumns);
|
|
233
233
|
if (props.hasVillageSelect) {
|
|
234
234
|
_deepColumns.splice(2, 0, {
|
|
235
235
|
title: t('ExtraManage.index.845270-7'),
|
|
@@ -186,6 +186,7 @@
|
|
|
186
186
|
</template>
|
|
187
187
|
|
|
188
188
|
<script>
|
|
189
|
+
import { cloneDeep } from "lodash";
|
|
189
190
|
import {computed, defineComponent, watch, reactive, toRefs, ref} from "vue";
|
|
190
191
|
import {Button, Col, Modal, Form, FormItem, Input, InputNumber, message, Row, Select, Switch} from "ant-design-vue";
|
|
191
192
|
import {t, loadLanguageAsync} from "../../../locale";
|
|
@@ -193,7 +194,6 @@ import utils from "../../../common/utils/util";
|
|
|
193
194
|
const useForm = Form.useForm;
|
|
194
195
|
import draggable from "vuedraggable";
|
|
195
196
|
import { DragOutlined , DeleteOutlined , QuestionCircleOutlined } from "@ant-design/icons-vue";
|
|
196
|
-
import _ from "lodash";
|
|
197
197
|
import TextTip from "../../TextTip/index.vue";
|
|
198
198
|
|
|
199
199
|
export default defineComponent({
|
|
@@ -302,7 +302,7 @@ export default defineComponent({
|
|
|
302
302
|
// 编辑
|
|
303
303
|
let params = {alias : props.alias};
|
|
304
304
|
params.id = props.id;
|
|
305
|
-
let formData =
|
|
305
|
+
let formData = cloneDeep(state.formState);
|
|
306
306
|
if (!props.hasVillageSelect) {
|
|
307
307
|
delete formData.village_id;
|
|
308
308
|
}
|
|
@@ -332,7 +332,7 @@ export default defineComponent({
|
|
|
332
332
|
} else {
|
|
333
333
|
// 添加
|
|
334
334
|
let params = { alias : props.alias };
|
|
335
|
-
let formData =
|
|
335
|
+
let formData = cloneDeep(state.formState);
|
|
336
336
|
if (!props.hasVillageSelect) {
|
|
337
337
|
delete formData.village_id;
|
|
338
338
|
}
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<script>
|
|
57
|
+
import { cloneDeep } from "lodash";
|
|
57
58
|
import {defineComponent, reactive, toRefs, defineAsyncComponent, computed} from "vue";
|
|
58
59
|
import ExtraManageEdit from "./components/ExtraManageEdit.vue";
|
|
59
60
|
import {Drawer, message,} from "ant-design-vue";
|
|
60
61
|
import {t, loadLanguageAsync} from "../../locale";
|
|
61
62
|
import utils from "../../common/utils/util";
|
|
62
|
-
import _ from "lodash";
|
|
63
63
|
const CustomTable = defineAsyncComponent(() =>
|
|
64
64
|
import("../CustomTable/index.vue")
|
|
65
65
|
);
|
|
@@ -202,7 +202,7 @@ export default defineComponent({
|
|
|
202
202
|
fixed: "right",
|
|
203
203
|
},
|
|
204
204
|
];
|
|
205
|
-
let _deepColumns =
|
|
205
|
+
let _deepColumns = cloneDeep(defaultColumns);
|
|
206
206
|
if (props.hasVillageSelect) {
|
|
207
207
|
_deepColumns.splice(2, 0, {
|
|
208
208
|
title: t('ExtraManage.index.845270-7'),
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script>
|
|
47
|
+
import { cloneDeep, isEmpty } from "lodash";
|
|
47
48
|
import {
|
|
48
49
|
defineComponent, reactive, toRefs, watch, createVNode, computed
|
|
49
50
|
} from "vue";
|
|
50
51
|
import {Modal, Alert, Table, message} from "ant-design-vue";
|
|
51
|
-
import _ from "lodash";
|
|
52
52
|
import { SyncOutlined, ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
|
53
53
|
import {t, loadLanguageAsync} from "../../locale";
|
|
54
54
|
import utils from "../../common/utils/util";
|
|
@@ -123,7 +123,7 @@ export default defineComponent({
|
|
|
123
123
|
name: v?.name || "", // 表名称
|
|
124
124
|
type: v?.type,
|
|
125
125
|
type_name: v?.type_txt || "",
|
|
126
|
-
enter_num:
|
|
126
|
+
enter_num: isEmpty(v.energyRecord)
|
|
127
127
|
? v?.original_reading
|
|
128
128
|
: v?.energyRecord?.last_number,
|
|
129
129
|
cost_name: v?.energyTypeData?.cost_type_txt || "",
|
|
@@ -141,7 +141,7 @@ export default defineComponent({
|
|
|
141
141
|
};
|
|
142
142
|
});
|
|
143
143
|
state.tableLoading = false;
|
|
144
|
-
emit('saveEnergy',
|
|
144
|
+
emit('saveEnergy', cloneDeep(state.dataList));
|
|
145
145
|
},
|
|
146
146
|
});
|
|
147
147
|
};
|
|
@@ -289,9 +289,9 @@ export default defineComponent({
|
|
|
289
289
|
},
|
|
290
290
|
];
|
|
291
291
|
if (props.isView) {
|
|
292
|
-
return
|
|
292
|
+
return cloneDeep(ENERGY_COLUMNS).filter((v) => !['current_remaining', 'action'].includes(v.key));
|
|
293
293
|
} else {
|
|
294
|
-
return
|
|
294
|
+
return cloneDeep(ENERGY_COLUMNS);
|
|
295
295
|
}
|
|
296
296
|
})
|
|
297
297
|
|
|
@@ -301,7 +301,7 @@ export default defineComponent({
|
|
|
301
301
|
if (val) {
|
|
302
302
|
if (props.isView) {
|
|
303
303
|
// 查看
|
|
304
|
-
state.dataList =
|
|
304
|
+
state.dataList = cloneDeep(props.energyList);
|
|
305
305
|
} else {
|
|
306
306
|
// 操作
|
|
307
307
|
getDataList();
|