widget.qw 0.0.1 → 1.0.0
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/build/style.css +101 -0
- package/build/widget.qw.es.js +639 -236
- package/build/widget.qw.umd.js +639 -236
- package/package.json +1 -1
- package/src/api/index.js +16 -0
- package/src/components/CascaderPicker.vue +107 -0
- package/src/components/index.js +35 -30
- package/src/components/widget/CascaderPop.vue +313 -0
- package/src/main.js +2 -2
- package/src/router/index.ts +5 -0
- package/src/util/tree_util.js +34 -0
- package/src/views/auditbar/index.vue +1 -1
- package/src/views/billcard/index.vue +1 -1
- package/src/views/cascaderpicker/index.vue +86 -0
- package/src/views/checkgroup/index.vue +1 -1
- package/src/views/dataSelector/index.vue +2 -2
- package/src/views/datetimepicker/index.vue +1 -1
- package/src/views/daydropdown/index.vue +1 -1
- package/src/views/filepicker/index.vue +1 -1
- package/src/views/home/index.vue +1 -0
- package/src/views/imagepicker/index.vue +1 -1
- package/src/views/imagespicker/index.vue +1 -1
- package/src/views/input/index.vue +1 -1
- package/src/views/monthdropdown/index.vue +1 -1
- package/src/views/multListSelector/index.vue +1 -1
- package/src/views/multipicker/index.vue +1 -1
- package/src/views/productSelector/index.vue +1 -1
- package/src/views/projectdropdown/index.vue +1 -1
- package/src/views/projectpicker/index.vue +1 -1
- package/src/views/sheet/index.vue +4 -4
- package/src/views/singlepicker/index.vue +1 -1
- package/src/views/subdepartmentSelector/index.vue +1 -1
- package/src/views/switch/index.vue +1 -1
- package/src/views/treepicker/index.vue +1 -1
- package/src/views/userSelector/index.vue +3 -3
- package/src/views/userSelectorNew/index.vue +1 -1
- package/src/views/userpicker/index.vue +1 -1
- package/src/views/userprofile/index.vue +1 -1
- package/src/views/userspicker/index.vue +1 -1
- package/src/views/yeardropdown/index.vue +1 -1
- package/vite.config.ts +2 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<widget-qw-cascader-picker v-model="data.id" label="零件" placeholder="请选择零件"
|
|
4
|
+
:queryNodes="queryNodes"
|
|
5
|
+
:queryNode="queryNode"
|
|
6
|
+
:auth="data.auth" />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { onMounted, reactive, watch } from "vue";
|
|
12
|
+
import util from '@/util'
|
|
13
|
+
|
|
14
|
+
const data = reactive({
|
|
15
|
+
auth: 'require',
|
|
16
|
+
id: '',
|
|
17
|
+
projectId:'GnsMl3mO'
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const queryNodes = async (params,setNodes) => {
|
|
21
|
+
if (!data.projectId)
|
|
22
|
+
return
|
|
23
|
+
|
|
24
|
+
let p = {
|
|
25
|
+
projectId: data.projectId,
|
|
26
|
+
hasChildren: false
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if(params.keyword)
|
|
30
|
+
p.keyword = params.keyword
|
|
31
|
+
|
|
32
|
+
if(params.parentId)
|
|
33
|
+
p.parentId = params.parentId
|
|
34
|
+
|
|
35
|
+
let res = await util.part_children(p)
|
|
36
|
+
if (res.code != 200)
|
|
37
|
+
return
|
|
38
|
+
|
|
39
|
+
let formatNodes = res.data.map(item=>{
|
|
40
|
+
return {
|
|
41
|
+
id:item.id,
|
|
42
|
+
label: item.formatName,
|
|
43
|
+
formatLabel: item.path,
|
|
44
|
+
hasChildren: item.hasChildren,
|
|
45
|
+
data: item
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
setNodes(formatNodes)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const queryNode=async(setNode)=>{
|
|
52
|
+
let params={
|
|
53
|
+
id:data.id
|
|
54
|
+
}
|
|
55
|
+
let res = await util.part_detail(params)
|
|
56
|
+
if(res.code!=200)
|
|
57
|
+
return
|
|
58
|
+
|
|
59
|
+
let formatNode = {
|
|
60
|
+
id:res.data.id,
|
|
61
|
+
label: res.data.formatName,
|
|
62
|
+
formatLabel: item.path,
|
|
63
|
+
hasChildren: res.data.hasChildren,
|
|
64
|
+
data:res.data
|
|
65
|
+
}
|
|
66
|
+
setNode(formatNode)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
watch(() => data.id, (newVal, oldVal) => {
|
|
70
|
+
console.log(newVal, oldVal)
|
|
71
|
+
})
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style lang="scss" scoped>
|
|
75
|
+
.page {
|
|
76
|
+
height: 100vh;
|
|
77
|
+
background: #fff;
|
|
78
|
+
text-align: center;
|
|
79
|
+
background-size: cover;
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
justify-content: flex-start;
|
|
83
|
+
padding: 80px 15px 0 15px;
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page">
|
|
3
|
-
<
|
|
3
|
+
<widget-qw-data-selector :options="options" v-model="formData.singleSelect" mode="single" label="单选数据"
|
|
4
4
|
placeholder="单选数据" :auth="formData.auth" />
|
|
5
|
-
<
|
|
5
|
+
<widget-qw-data-selector :options="options" v-model="formData.multSelect" mode="multiple" label="多选数据"
|
|
6
6
|
placeholder="多选数据" :required="true" :readonly="false" />
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
package/src/views/home/index.vue
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
<van-button class="btn" type="primary" @click="router.push('/switch')">开关</van-button>
|
|
33
33
|
<van-button class="btn" type="primary" @click="router.push('/sheet')">表格</van-button>
|
|
34
34
|
<van-button class="btn" type="primary" @click="router.push('/treepicker')">树选择器</van-button>
|
|
35
|
+
<van-button class="btn" type="primary" @click="router.push('/cascaderpicker')">级联选择器</van-button>
|
|
35
36
|
</div>
|
|
36
37
|
</template>
|
|
37
38
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page">
|
|
3
|
-
<
|
|
3
|
+
<widget-qw--input label="单号" v-model="data.text" :auth="data.auth" :type="data.type" :rows="data.rows" :autosize="data.autosize" />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page">
|
|
3
|
-
<
|
|
3
|
+
<widget-qw-sheet v-model="data.datas" :auth="data.auth" label="子表">
|
|
4
4
|
<template #item="{item}">
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<
|
|
5
|
+
<widget-qw-input label="姓名" v-model="item.name" :auth="data.auth" />
|
|
6
|
+
<widget-qw-input label="年龄" v-model="item.age" :auth="data.auth" />
|
|
7
|
+
<widget-qw-datetime-picker v-model="item.detectionTime" label="检测时间" placeholder="请选择检测时间" :auth="data.auth" />
|
|
8
8
|
</template>
|
|
9
9
|
</uiqw-sheet>
|
|
10
10
|
</div>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page">
|
|
3
|
-
<
|
|
3
|
+
<widget-qw-user-selector v-model="formData.singleUser"
|
|
4
4
|
label="单选人员"
|
|
5
5
|
mode="single"
|
|
6
6
|
:auth="formData.auth"
|
|
7
7
|
@select="onSelect" />
|
|
8
8
|
|
|
9
|
-
<
|
|
9
|
+
<widget-qw-user-selector v-model="formData.multUser"
|
|
10
10
|
label="多选人员"
|
|
11
11
|
mode="multiple"
|
|
12
12
|
:required="true"
|
|
13
13
|
:rules="[{ required: true, message: '请选择人员' }]"
|
|
14
14
|
:readonly="false" />
|
|
15
15
|
|
|
16
|
-
<
|
|
16
|
+
<widget-qw-user-selector v-model="formData.singleUser"
|
|
17
17
|
label="指定部门下的人员"
|
|
18
18
|
mode="single"
|
|
19
19
|
:required="true"
|
package/vite.config.ts
CHANGED
|
@@ -40,8 +40,8 @@ export default {
|
|
|
40
40
|
VUE_APP_NEED_LOGIN_CODE: 401,
|
|
41
41
|
//注意:发布时 VUE_APP_IS_DEBUG必须配置为false
|
|
42
42
|
// 本地开发时 VUE_APP_IS_DEBUG必须配置为true
|
|
43
|
-
VUE_APP_IS_DEBUG: false,
|
|
44
|
-
|
|
43
|
+
// VUE_APP_IS_DEBUG: false,
|
|
44
|
+
VUE_APP_IS_DEBUG: true,
|
|
45
45
|
VUE_APP_DEBUG_TOKEN: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns'
|
|
46
46
|
},
|
|
47
47
|
},
|