centaline-data-driven-v3 0.1.27 → 0.1.29
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/dist/centaline-data-driven-v3.umd.js +74 -74
- package/package.json +1 -1
- package/src/components/app/File.vue +11 -7
- package/src/components/web/SearchList/SearchSideRight.vue +1 -0
- package/src/components/web/SearchList/SearchTable.vue +7 -0
- package/src/components/web/SearchList.vue +1 -1
- package/src/components/web/TextBox.vue +15 -2
- package/src/components/web/Tree/Tree.vue +28 -20
- package/src/components/web/Tree.vue +1 -1
- package/src/main.js +3 -3
- package/src/views/Form.vue +3 -5
- package/src/views/SearchList.vue +2 -2
package/package.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<div class="ct-fielduploader" ref="refupload" v-if="model !== null">
|
|
3
3
|
<div class="van-uploader">
|
|
4
4
|
<div class="van-uploader__wrapper">
|
|
5
|
-
<draggable :list="model.fileList" v-bind="dragOptions" @change="onEnd"
|
|
5
|
+
<draggable :list="model.fileList" v-bind="dragOptions" @change="onEnd" :delay="100"
|
|
6
|
+
:touch-start-threshold="5" class="card" style="display: flex;">
|
|
6
7
|
<template #item="{ element, index }">
|
|
7
8
|
<div class="van-uploader__preview">
|
|
8
9
|
<template v-if="!element.progressFlag">
|
|
@@ -11,7 +12,8 @@
|
|
|
11
12
|
class="van-image__img" style="object-fit: cover;">
|
|
12
13
|
<div class="van-uploader__preview-cover"
|
|
13
14
|
v-if="(model.locked && element.mediaLabelName) || model.paramName1">
|
|
14
|
-
<div class="preview-cover van-ellipsis"
|
|
15
|
+
<div class="preview-cover van-ellipsis"
|
|
16
|
+
@click.stop="classifyClickHandle(element)">
|
|
15
17
|
{{ element.mediaLabelName }}</div>
|
|
16
18
|
</div>
|
|
17
19
|
</div>
|
|
@@ -27,7 +29,8 @@
|
|
|
27
29
|
</div>
|
|
28
30
|
<span class="cover-list-item-play" v-if="element.videoPlayIconUrl">
|
|
29
31
|
<div class="swiper-i">
|
|
30
|
-
<img @click="viewerfile(element)" :src="element.videoPlayIconUrl"
|
|
32
|
+
<img @click="viewerfile(element)" :src="element.videoPlayIconUrl"
|
|
33
|
+
class="hous-icon" />
|
|
31
34
|
</div>
|
|
32
35
|
</span>
|
|
33
36
|
<span class="cover-list-item-play"
|
|
@@ -146,9 +149,9 @@ function uploadProcess(file) {
|
|
|
146
149
|
function handleRemove(file) {
|
|
147
150
|
showConfirmDialog({
|
|
148
151
|
title: "提示",
|
|
149
|
-
confirmButtonText: common.LocalizedString("确定","確認"),
|
|
152
|
+
confirmButtonText: common.LocalizedString("确定", "確認"),
|
|
150
153
|
cancelButtonText: "取消",
|
|
151
|
-
message: common.LocalizedString("确定删除该附件?","確定刪除該附件?"),
|
|
154
|
+
message: common.LocalizedString("确定删除该附件?", "確定刪除該附件?"),
|
|
152
155
|
})
|
|
153
156
|
.then(() => {
|
|
154
157
|
File.deleteFile(file, false, model.value);
|
|
@@ -274,7 +277,7 @@ function viewerfile(file) {
|
|
|
274
277
|
}
|
|
275
278
|
|
|
276
279
|
function onEnd(ev) {
|
|
277
|
-
File.changeFile(model.value,model.value.fileList[ev.moved.oldIndex], model.value.fileList[ev.moved.newIndex])
|
|
280
|
+
File.changeFile(model.value, model.value.fileList[ev.moved.oldIndex], model.value.fileList[ev.moved.newIndex])
|
|
278
281
|
}
|
|
279
282
|
defineExpose({
|
|
280
283
|
model
|
|
@@ -294,8 +297,9 @@ defineExpose({
|
|
|
294
297
|
color: #fff;
|
|
295
298
|
font-size: 12px;
|
|
296
299
|
text-align: center;
|
|
297
|
-
background:
|
|
300
|
+
background: #000000;
|
|
298
301
|
height: 24px;
|
|
302
|
+
opacity: 0.5;
|
|
299
303
|
}
|
|
300
304
|
|
|
301
305
|
.ct-fielduploader .van-uploader__preview-image {
|
|
@@ -780,6 +780,13 @@ function rolRouterClickHandler(field, rowData, rowindex, visible, columnName, co
|
|
|
780
780
|
model.value.flagSideBar = true;
|
|
781
781
|
model.value.isPageInSideBar = true;
|
|
782
782
|
model.value.sideBarWidth = field.pageWidth;
|
|
783
|
+
var clientX = event.clientX;
|
|
784
|
+
setTimeout(() => {
|
|
785
|
+
if (window.innerWidth - 40 - field.pageWidth < clientX) {
|
|
786
|
+
refTableParent.value.scrollLeft = refTableParent.value.scrollLeft + (clientX - (window.innerWidth - 40 - field.pageWidth)) + 100;
|
|
787
|
+
}
|
|
788
|
+
}, 100);
|
|
789
|
+
|
|
783
790
|
emit("loaded");
|
|
784
791
|
return;
|
|
785
792
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
@clickPrevHandler="clickPrevHandler" @simpleRouterclickHandler="simpleRouterclickHandler"
|
|
33
33
|
@closeSideHandler="closeSideHandler" @submit="submitHandler"></SearchSideRight>
|
|
34
34
|
<SearchSideMenu ref="refSideMenu" :sideBarMenuRight="sideBarMenuRight" :sideBarStatus="sideBarStatus"
|
|
35
|
-
@sideMenuClickHandler="sideMenuClickHandler"
|
|
35
|
+
@sideMenuClickHandler="sideMenuClickHandler"></SearchSideMenu>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
</template>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@change="change()" :disabled="model.locked" :rows="model.rows" :readonly="model.readonly"
|
|
7
7
|
:show-password="model.inputType == 'password'" autocomplete="on" :maxlength="model.maxValue1"
|
|
8
8
|
:show-word-limit="model.showWordLimit" clearable @keyup.enter.native="search()"
|
|
9
|
-
class="fieldControl">
|
|
9
|
+
@keydown.enter.native="handleKeyDown" class="fieldControl">
|
|
10
10
|
<template #suffix>
|
|
11
11
|
<span v-if="model.unitName1">{{ model.unitName1 }}</span>
|
|
12
12
|
</template>
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
@change="change()" :disabled="model.locked" :rows="model.rows" :readonly="model.readonly"
|
|
18
18
|
:show-password="model.inputType == 'password'" autocomplete="on"
|
|
19
19
|
:maxlength="model.controlType !== Enum.ControlType.NumericTextBox ? model.maxValue1 : ''"
|
|
20
|
-
:show-word-limit="model.showWordLimit" clearable @keyup.enter.native="search()"
|
|
20
|
+
:show-word-limit="model.showWordLimit" clearable @keyup.enter.native="search()"
|
|
21
|
+
@keydown.enter.native="handleKeyDown" class="fieldControl">
|
|
21
22
|
<template #suffix>
|
|
22
23
|
<span v-if="model.unitName1">{{ model.unitName1 }}</span>
|
|
23
24
|
</template>
|
|
@@ -34,6 +35,8 @@
|
|
|
34
35
|
</ct-field>
|
|
35
36
|
</template>
|
|
36
37
|
<script lang="ts" setup>
|
|
38
|
+
import { ref } from 'vue'
|
|
39
|
+
|
|
37
40
|
import { initData, changeHandler } from '../../utils/mixins';
|
|
38
41
|
import TextBox from '../../loader/src/TextBox';
|
|
39
42
|
import Enum from '../../utils/Enum'
|
|
@@ -47,6 +50,7 @@ const props = defineProps({
|
|
|
47
50
|
default: ''
|
|
48
51
|
},
|
|
49
52
|
})
|
|
53
|
+
const isEnterPressed = ref(false);
|
|
50
54
|
const model = initData(props, TextBox)
|
|
51
55
|
model.value.selfValidExcute = () => {
|
|
52
56
|
model.value.valid = true;
|
|
@@ -64,6 +68,12 @@ function search() {
|
|
|
64
68
|
if (model.value.autoSearch || props.from == 'tree') {
|
|
65
69
|
emit('search');
|
|
66
70
|
}
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
isEnterPressed.value = false;
|
|
73
|
+
}, 100);
|
|
74
|
+
}
|
|
75
|
+
function handleKeyDown(event) {
|
|
76
|
+
isEnterPressed.value = true;
|
|
67
77
|
}
|
|
68
78
|
function input() {
|
|
69
79
|
if (model.value.controlType === Enum.ControlType.MultiLineText || model.value.controlType === Enum.ControlType.TextBox) {
|
|
@@ -74,6 +84,9 @@ function input() {
|
|
|
74
84
|
}
|
|
75
85
|
function change() {
|
|
76
86
|
changeHandler(model.value, emit);
|
|
87
|
+
if (isEnterPressed.value) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
77
90
|
if (props.from == 'tree') { emit('search'); }
|
|
78
91
|
}
|
|
79
92
|
//弹出选择列表
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div id="ct-tree" class="ct-tree" oncontextmenu="event.preventDefault()" style="overflow:auto;" v-loading="loading"
|
|
2
|
+
<div id="ct-tree" class="ct-tree" oncontextmenu="event.preventDefault()" style="overflow:auto;" v-loading="loading"
|
|
3
|
+
:style="{ height: props.treeHeight - 10 + 'px' }">
|
|
3
4
|
<el-tree class="tree-line" :props="defaultProps" :load="loadNode" :expand-on-click-node="false"
|
|
4
5
|
@node-click="handleNodeClick" lazy ref="refTree" @node-contextmenu="rightClick" node-key="code"
|
|
5
6
|
current-node-key="currentNodeKey">
|
|
@@ -50,10 +51,10 @@ const props = defineProps({
|
|
|
50
51
|
Number,
|
|
51
52
|
default: 500,
|
|
52
53
|
},
|
|
53
|
-
})
|
|
54
|
+
})
|
|
54
55
|
const refTree = ref()
|
|
55
|
-
const rootNode
|
|
56
|
-
const rootResolve
|
|
56
|
+
const rootNode = ref();
|
|
57
|
+
const rootResolve = ref();
|
|
57
58
|
const LastClickNode = ref(null)
|
|
58
59
|
const defaultProps = ref({
|
|
59
60
|
label: 'name',
|
|
@@ -65,13 +66,13 @@ const defaultProps = ref({
|
|
|
65
66
|
const searchStatus = ref([])
|
|
66
67
|
|
|
67
68
|
const menuVisible = ref(false)//右键菜单显示控制
|
|
68
|
-
const currentData = ref({code:""})// 当前节点所对应的数据
|
|
69
|
+
const currentData = ref({ code: "" })// 当前节点所对应的数据
|
|
69
70
|
const currentNode = ref(null)//当前节点对应的 Node
|
|
70
71
|
const loading = ref(false)//数据理否查询完成
|
|
71
72
|
|
|
72
|
-
const model = ref(null)
|
|
73
|
+
const model = ref(null)
|
|
73
74
|
const nodeRef = ref()
|
|
74
|
-
|
|
75
|
+
const retryCount = ref(0);
|
|
75
76
|
const treeNodeRefMap = ref({});
|
|
76
77
|
/** 动态设置Input Ref */
|
|
77
78
|
const handleSetInputMap = (el: refItem, item) => {
|
|
@@ -80,8 +81,8 @@ const handleSetInputMap = (el: refItem, item) => {
|
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
83
|
|
|
83
|
-
const qrtimer=ref(null)
|
|
84
|
-
onBeforeUnmount(()=>{
|
|
84
|
+
const qrtimer = ref(null)
|
|
85
|
+
onBeforeUnmount(() => {
|
|
85
86
|
if (qrtimer.value) {
|
|
86
87
|
clearTimeout(qrtimer.value);
|
|
87
88
|
qrtimer.value = null;
|
|
@@ -91,24 +92,32 @@ onBeforeUnmount(()=>{
|
|
|
91
92
|
//搜索(查询条件调用)
|
|
92
93
|
function search(m) {
|
|
93
94
|
if (searchStatus.value.length == 0) {
|
|
94
|
-
|
|
95
|
+
// 重置计数器
|
|
96
|
+
retryCount.value = 0
|
|
97
|
+
if (qrtimer.value) clearTimeout(qrtimer.value);
|
|
95
98
|
searchStatus.value.push('a');
|
|
96
99
|
rootNode.value.childNodes = []
|
|
97
|
-
loadNode(rootNode.value, rootResolve.value,m)
|
|
100
|
+
loadNode(rootNode.value, rootResolve.value, m)
|
|
98
101
|
}
|
|
99
102
|
else {
|
|
103
|
+
if (retryCount.value >= 50) {
|
|
104
|
+
console.warn(`搜索繁忙,请稍后再试`);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
retryCount.value++
|
|
108
|
+
|
|
100
109
|
qrtimer.value = setTimeout(() => {
|
|
101
110
|
search(m);
|
|
102
111
|
}, 200);
|
|
103
112
|
}
|
|
104
113
|
}
|
|
105
114
|
//加载节点(点击节点加号时调用)
|
|
106
|
-
function loadNode(node, resolve,m) {
|
|
115
|
+
function loadNode(node, resolve, m) {
|
|
107
116
|
if (node.level === 0) {
|
|
108
117
|
loading.value = true;
|
|
109
118
|
rootNode.value = node
|
|
110
119
|
rootResolve.value = resolve;
|
|
111
|
-
return SearchTree(m||undefined).then(data => {
|
|
120
|
+
return SearchTree(m || undefined).then(data => {
|
|
112
121
|
loading.value = false;
|
|
113
122
|
resolve(data.rows);
|
|
114
123
|
load(data, true)
|
|
@@ -131,7 +140,7 @@ async function load(data, firstLoad) {
|
|
|
131
140
|
model.value = data;
|
|
132
141
|
if (searchStatus.value.length > 0) {
|
|
133
142
|
searchStatus.value = searchStatus.value.slice(1)
|
|
134
|
-
}
|
|
143
|
+
}
|
|
135
144
|
loading.value = false;
|
|
136
145
|
menuVisible.value = false;
|
|
137
146
|
if (firstLoad) {
|
|
@@ -150,7 +159,7 @@ function SearchTree(m) {
|
|
|
150
159
|
|
|
151
160
|
return new Promise((resolve, reject) => {
|
|
152
161
|
if (typeof props.api !== 'undefined') {
|
|
153
|
-
|
|
162
|
+
|
|
154
163
|
resolve(Tree.loadSearchTreeApi(props.api, m));
|
|
155
164
|
}
|
|
156
165
|
});
|
|
@@ -183,7 +192,7 @@ function handleNodeClick(data, formType) {
|
|
|
183
192
|
//右键菜单
|
|
184
193
|
function rightClick(event, object, Node) { // event、object该节点所对应的对象、节点对应的 Node、节点组件本身
|
|
185
194
|
nodeRef.value = treeNodeRefMap.value[`node_Ref_${object.code}`]
|
|
186
|
-
|
|
195
|
+
|
|
187
196
|
currentData.value = object
|
|
188
197
|
currentNode.value = Node
|
|
189
198
|
let actionIndex = 0;
|
|
@@ -201,7 +210,7 @@ function rightClick(event, object, Node) { // event、object该节点所对应
|
|
|
201
210
|
function closeMenu() {
|
|
202
211
|
menuVisible.value = false;
|
|
203
212
|
nodeRef.value = null
|
|
204
|
-
currentData.value = { ...currentData.value,code:"" }
|
|
213
|
+
currentData.value = { ...currentData.value, code: "" }
|
|
205
214
|
document.removeEventListener('click', closeMenu)
|
|
206
215
|
}
|
|
207
216
|
// 菜单路由
|
|
@@ -440,10 +449,10 @@ defineExpose({
|
|
|
440
449
|
background-size: 10px;
|
|
441
450
|
}
|
|
442
451
|
|
|
443
|
-
.box-menu {
|
|
452
|
+
.box-menu {
|
|
444
453
|
z-index: 1000;
|
|
445
454
|
background-color: #fff;
|
|
446
|
-
|
|
455
|
+
padding: 10px;
|
|
447
456
|
|
|
448
457
|
div {
|
|
449
458
|
cursor: pointer;
|
|
@@ -459,4 +468,3 @@ defineExpose({
|
|
|
459
468
|
color: var(--btnHoverRed);
|
|
460
469
|
}
|
|
461
470
|
</style>
|
|
462
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div ref="refscreenDiv" id="refscreenDiv">
|
|
4
|
-
<ct-searchscreen ref="reftreescreen" :from="'tree'" :api="searchConditionApi" :screenPara="screenPara"
|
|
4
|
+
<ct-searchscreen ref="reftreescreen" :from="'tree'" style="padding-left: 11px;" :api="searchConditionApi" :screenPara="screenPara"
|
|
5
5
|
@search="search" @loaded="screenload" ></ct-searchscreen>
|
|
6
6
|
</div>
|
|
7
7
|
<tree v-if="loadTree" ref="reftree" :api="searchDataApi" @loaded="loaded" :treeHeight="treeHeight">
|
package/src/main.js
CHANGED
|
@@ -21,7 +21,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
app.use(centaline, {
|
|
24
|
-
baseUrl: "
|
|
24
|
+
baseUrl: "https://kq-api-gz.centaline.com.cn/onecard-api/",
|
|
25
25
|
//baseUrl:"http://10.88.22.13:7070/onecard-api/",
|
|
26
26
|
//baseUrl: "https://kq-api.centaline.com.cn/onecard-api/",
|
|
27
27
|
//baseUrl: "http://10.88.22.13:6060/onecard-api/",
|
|
@@ -30,7 +30,7 @@ app.use(centaline, {
|
|
|
30
30
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
31
31
|
|
|
32
32
|
flagRouterSelf: true,
|
|
33
|
-
flagApp:
|
|
33
|
+
flagApp: true,//是否app端
|
|
34
34
|
zindex: 999,
|
|
35
35
|
showRequestSuccessMessage: true,
|
|
36
36
|
showRequestErrorMessage: true,
|
|
@@ -65,7 +65,7 @@ app.use(centaline, {
|
|
|
65
65
|
//获取请求头
|
|
66
66
|
getRequestHeaders: function () {
|
|
67
67
|
return {
|
|
68
|
-
authobject: '{token:"jiangzf-
|
|
68
|
+
authobject: '{token:"jiangzf-1983422832318779392",platform:"WEB"}',
|
|
69
69
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
70
70
|
//authObject: '{token:"jiangzf-1958445358178844672",platform:"WEB"}',
|
|
71
71
|
//authObject: '{EmpID:"Token_4e09499b-4b76-46df-9ce5-5498d48ed062",MachineCode:"ae184643-f8e2-453c-a752-ba82612b592f",SSO_Token:"SSOToken_4e09499b-4b76-46df-9ce5-5498d48ed062",Platform:"WEB"}',
|
package/src/views/Form.vue
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
|
|
3
|
-
<ct-form :api="'/
|
|
3
|
+
<ct-form :api="'/EmployeeMaternity/readDetail'" :apiParam="apiParam"></ct-form>
|
|
4
4
|
<!-- <ct-textbox :source="source"></ct-textbox> -->
|
|
5
|
-
|
|
5
|
+
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
<script lang="ts" setup>
|
|
9
9
|
const apiParam={
|
|
10
|
-
"actionType": 2
|
|
11
|
-
"empID": "{90A76197-49CC-4D81-A08E-048557757B57}"
|
|
10
|
+
"actionType": 2
|
|
12
11
|
}
|
|
13
|
-
const source={"controlType":2,"showLabel":true,"controlLabel":"制度标识","groupExpand":false,"singleLine":false,"rows":1,"required":true,"spanCols":1,"locked":false,"autoFill":false,"searchDataType":1,"searchOperation":1,"displayLabelAfterSelected":true,"autoSearch":false,"mediaViewPageType":1,"fieldName1":"WorkSystemID","code1":"CD","name1":"","decimals1":-1,"maxValue1":"50","preLabel1":"","sufLabel1":"","fieldName2":"","code2":"","name2":"","decimals2":-1,"decimals3":0,"decimals4":-1,"width":200,"applyNew":1,"applyEdit":1,"applyBrowse":1}
|
|
14
12
|
</script>
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'
|
|
4
|
-
:searchDataApi="'
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'https://kq-api-gz.centaline.com.cn/onecard-api/EmployeeWorkLogList/ind/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'https://kq-api-gz.centaline.com.cn/onecard-api/EmployeeWorkLogList/ind/getListOfSearchModel'"></ct-searchlist>
|
|
5
5
|
|
|
6
6
|
<!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/EmployeeMaternityList/getLayoutOfSearch'"
|
|
7
7
|
:searchDataApi="'/EmployeeMaternityList/getListOfSearchModel'"></ct-searchlist> -->
|