widget.qw 0.0.1
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/README.md +73 -0
- package/build/favicon.ico +0 -0
- package/build/style.css +763 -0
- package/build/widget.qw.es.js +20653 -0
- package/build/widget.qw.umd.js +20660 -0
- package/index.html +17 -0
- package/package.json +47 -0
- package/public/favicon.ico +0 -0
- package/src/App.vue +26 -0
- package/src/api/index.js +126 -0
- package/src/assets/avatar.png +0 -0
- package/src/assets/banner_handle.png +0 -0
- package/src/assets/bg_blue.png +0 -0
- package/src/assets/bg_white.png +0 -0
- package/src/assets/down.png +0 -0
- package/src/assets/home.jpg +0 -0
- package/src/assets/icon_box.png +0 -0
- package/src/assets/icon_dot.png +0 -0
- package/src/assets/icon_draw.png +0 -0
- package/src/assets/icon_file.png +0 -0
- package/src/assets/icon_fold.png +0 -0
- package/src/assets/icon_shield.png +0 -0
- package/src/assets/logo.png +0 -0
- package/src/components/AuditBar.vue +341 -0
- package/src/components/BillCard.vue +156 -0
- package/src/components/CheckGroup.vue +114 -0
- package/src/components/DatetimePicker/DatetimePop.vue +343 -0
- package/src/components/DatetimePicker/index.vue +113 -0
- package/src/components/DayDropdown.vue +57 -0
- package/src/components/FilePicker.vue +114 -0
- package/src/components/Input.vue +72 -0
- package/src/components/MonthDropdown.vue +52 -0
- package/src/components/MultiPicker.vue +124 -0
- package/src/components/ProjectDropdown.vue +62 -0
- package/src/components/ProjectPicker.vue +111 -0
- package/src/components/SecretNotify.js +6 -0
- package/src/components/Sheet.vue +93 -0
- package/src/components/SinglePicker.vue +103 -0
- package/src/components/SingleUserSelector.vue +425 -0
- package/src/components/Switch.vue +65 -0
- package/src/components/TreePicker.vue +113 -0
- package/src/components/UserPicker.vue +107 -0
- package/src/components/UserProfile.vue +128 -0
- package/src/components/UsersPicker.vue +118 -0
- package/src/components/YearDropdown.vue +60 -0
- package/src/components/data_selector.vue +281 -0
- package/src/components/image_picker.vue +115 -0
- package/src/components/images_picker.vue +140 -0
- package/src/components/index.js +157 -0
- package/src/components/mult_list_selector.vue +156 -0
- package/src/components/product_selector.vue +186 -0
- package/src/components/subdepartment_selector.vue +481 -0
- package/src/components/user_selector.vue +639 -0
- package/src/components/widget/DataPop.vue +96 -0
- package/src/components/widget/TreePop.vue +89 -0
- package/src/components/widget/UserPop.vue +347 -0
- package/src/env.d.ts +8 -0
- package/src/main.js +111 -0
- package/src/router/index.ts +165 -0
- package/src/util/array_util.js +32 -0
- package/src/util/auth_util.js +73 -0
- package/src/util/bool_util.js +6 -0
- package/src/util/bus.js +2 -0
- package/src/util/cache_util.js +19 -0
- package/src/util/errer_code.js +7 -0
- package/src/util/eval_util.js +20 -0
- package/src/util/icon_util.js +37 -0
- package/src/util/image_util.js +28 -0
- package/src/util/index.js +56 -0
- package/src/util/num_util.js +71 -0
- package/src/util/obj_util.js +29 -0
- package/src/util/request.js +74 -0
- package/src/util/request_json.js +72 -0
- package/src/util/request_json_mute.js +66 -0
- package/src/util/request_upload.js +79 -0
- package/src/util/route_util.js +32 -0
- package/src/util/str_util.js +144 -0
- package/src/util/time_util.js +407 -0
- package/src/util/toast_util.js +25 -0
- package/src/util/tree_util.js +120 -0
- package/src/util/validate.js +183 -0
- package/src/util/vue_filter.js +223 -0
- package/src/views/auditbar/index.vue +66 -0
- package/src/views/billcard/index.vue +46 -0
- package/src/views/checkgroup/index.vue +36 -0
- package/src/views/dataSelector/index.vue +49 -0
- package/src/views/datetimepicker/index.vue +35 -0
- package/src/views/daydropdown/index.vue +31 -0
- package/src/views/filepicker/index.vue +32 -0
- package/src/views/home/index.vue +64 -0
- package/src/views/imagepicker/index.vue +32 -0
- package/src/views/imagespicker/index.vue +32 -0
- package/src/views/input/index.vue +35 -0
- package/src/views/monthdropdown/index.vue +31 -0
- package/src/views/multListSelector/index.vue +61 -0
- package/src/views/multipicker/index.vue +37 -0
- package/src/views/productSelector/index.vue +35 -0
- package/src/views/projectdropdown/index.vue +31 -0
- package/src/views/projectpicker/index.vue +42 -0
- package/src/views/secretnotify/index.vue +28 -0
- package/src/views/sheet/index.vue +46 -0
- package/src/views/singlepicker/index.vue +36 -0
- package/src/views/subdepartmentSelector/index.vue +41 -0
- package/src/views/switch/index.vue +35 -0
- package/src/views/treepicker/index.vue +42 -0
- package/src/views/userSelector/index.vue +54 -0
- package/src/views/userSelectorNew/index.vue +45 -0
- package/src/views/userpicker/index.vue +43 -0
- package/src/views/userprofile/index.vue +30 -0
- package/src/views/userspicker/index.vue +43 -0
- package/src/views/yeardropdown/index.vue +32 -0
- package/src/vm/index.js +6 -0
- package/tsconfig.json +19 -0
- package/tsconfig.node.json +8 -0
- package/vite.config.ts +73 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<uiqw-user-selector v-model="formData.singleUser"
|
|
4
|
+
label="单选人员"
|
|
5
|
+
mode="single"
|
|
6
|
+
:auth="formData.auth"
|
|
7
|
+
@select="onSelect" />
|
|
8
|
+
|
|
9
|
+
<uiqw-user-selector v-model="formData.multUser"
|
|
10
|
+
label="多选人员"
|
|
11
|
+
mode="multiple"
|
|
12
|
+
:required="true"
|
|
13
|
+
:rules="[{ required: true, message: '请选择人员' }]"
|
|
14
|
+
:readonly="false" />
|
|
15
|
+
|
|
16
|
+
<uiqw-user-selector v-model="formData.singleUser"
|
|
17
|
+
label="指定部门下的人员"
|
|
18
|
+
mode="single"
|
|
19
|
+
:required="true"
|
|
20
|
+
:currentDept="formData.department"
|
|
21
|
+
:rules="[{ required: true, message: '请选择人员' }]"
|
|
22
|
+
:readonly="false" />
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
import { ref, onMounted, reactive, watch } from "vue";
|
|
28
|
+
|
|
29
|
+
const formData = ref({
|
|
30
|
+
department: '1517', // 组件默认展开哪个部门下的数据,可为空
|
|
31
|
+
singleUser: '014391',
|
|
32
|
+
multUser: ['014391','014392'],
|
|
33
|
+
auth:'require'
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const onSelect=(e)=>{
|
|
37
|
+
console.log('onSelect', e)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss" scoped>
|
|
43
|
+
.page {
|
|
44
|
+
height: 100vh;
|
|
45
|
+
background: #fff;
|
|
46
|
+
text-align: center;
|
|
47
|
+
background-size: cover;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
justify-content: flex-start;
|
|
51
|
+
padding: 80px 15px 0 15px;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<UiqwSingleUserSelector
|
|
4
|
+
:auth="formData.auth"
|
|
5
|
+
:deptRangeId="formData.deptRangeId"
|
|
6
|
+
v-model="formData.singleUser"
|
|
7
|
+
@select="onSelect"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { reactive ,onMounted} from "vue";
|
|
14
|
+
const formData = reactive({
|
|
15
|
+
departmentId: "1517", // 组件默认展开哪个部门下的数据,可为空
|
|
16
|
+
deptRangeId: "production_dept_ids",
|
|
17
|
+
singleUser: "023663",
|
|
18
|
+
// singleUser: "014391",
|
|
19
|
+
auth: "require",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const onSelect=(e)=>{
|
|
23
|
+
console.log('onSelect', e)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
onMounted(()=>{
|
|
27
|
+
setTimeout(()=>{
|
|
28
|
+
formData.singleUser = '014391'
|
|
29
|
+
},10000)
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style lang="scss" scoped>
|
|
34
|
+
.page {
|
|
35
|
+
height: 100vh;
|
|
36
|
+
background: #fff;
|
|
37
|
+
text-align: center;
|
|
38
|
+
background-size: cover;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: flex-start;
|
|
42
|
+
padding: 80px 15px 0 15px;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<UiqwUserPicker
|
|
4
|
+
:auth="formData.auth"
|
|
5
|
+
v-model="formData.userId"
|
|
6
|
+
@select="onSelect"
|
|
7
|
+
rootDeptId="-1"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { reactive ,onMounted} from "vue";
|
|
14
|
+
const formData = reactive({
|
|
15
|
+
deptRangeId: "production_dept_ids",
|
|
16
|
+
userId: "014391",
|
|
17
|
+
auth: "option",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const onSelect=(e)=>{
|
|
21
|
+
console.log('onSelect', e)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
onMounted(()=>{
|
|
25
|
+
setTimeout(()=>{
|
|
26
|
+
formData.singleUser = '014391'
|
|
27
|
+
},10000)
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped>
|
|
32
|
+
.page {
|
|
33
|
+
height: 100vh;
|
|
34
|
+
background: #fff;
|
|
35
|
+
text-align: center;
|
|
36
|
+
background-size: cover;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
justify-content: flex-start;
|
|
40
|
+
padding: 80px 15px 0 15px;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<uiqw-user-profile @logout="onLogout" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { reactive ,onMounted} from "vue";
|
|
9
|
+
|
|
10
|
+
const onLogout=(e)=>{
|
|
11
|
+
console.log('+++onLogout+++', e)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
onMounted(()=>{
|
|
15
|
+
})
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style lang="scss" scoped>
|
|
19
|
+
.page {
|
|
20
|
+
height: 100vh;
|
|
21
|
+
background: #fff;
|
|
22
|
+
text-align: center;
|
|
23
|
+
background-size: cover;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
padding: 80px 15px 0 15px;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<UiqwUsersPicker
|
|
4
|
+
:auth="formData.auth"
|
|
5
|
+
:deptRangeId="formData.deptRangeId"
|
|
6
|
+
v-model="formData.userIds"
|
|
7
|
+
@select="onSelect"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { reactive ,onMounted} from "vue";
|
|
14
|
+
const formData = reactive({
|
|
15
|
+
deptRangeId: "production_dept_ids",
|
|
16
|
+
userIds: null,
|
|
17
|
+
auth: "require",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const onSelect=(e)=>{
|
|
21
|
+
console.log('onSelect', e)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
onMounted(()=>{
|
|
25
|
+
// setTimeout(()=>{
|
|
26
|
+
// formData.singleUser = '014391'
|
|
27
|
+
// },10000)
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped>
|
|
32
|
+
.page {
|
|
33
|
+
height: 100vh;
|
|
34
|
+
background: #fff;
|
|
35
|
+
text-align: center;
|
|
36
|
+
background-size: cover;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
justify-content: flex-start;
|
|
40
|
+
padding: 80px 15px 0 15px;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<van-dropdown-menu>
|
|
4
|
+
<uiqw-year-dropdown v-model="formData.year" startYear="2020" />
|
|
5
|
+
</van-dropdown-menu>
|
|
6
|
+
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { reactive, onMounted } from "vue";
|
|
12
|
+
const formData = reactive({
|
|
13
|
+
year: new Date().getFullYear()
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
onMounted(() => {
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style lang="scss" scoped>
|
|
21
|
+
.page {
|
|
22
|
+
height: 100vh;
|
|
23
|
+
background: #fff;
|
|
24
|
+
text-align: center;
|
|
25
|
+
background-size: cover;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
justify-content: flex-start;
|
|
29
|
+
padding: 80px 15px 0 15px;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
package/src/vm/index.js
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"jsx": "preserve",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"lib": ["esnext", "dom"],
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
18
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
19
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import vue from "@vitejs/plugin-vue";
|
|
2
|
+
import styleImport, { VantResolve } from "vite-plugin-style-import";
|
|
3
|
+
import { resolve } from "path"; // 主要用于alias文件路径别名
|
|
4
|
+
//vite版require
|
|
5
|
+
import requireTransform from "vite-plugin-require-transform";
|
|
6
|
+
const path = require("path");
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
build: {
|
|
10
|
+
outDir: 'build',
|
|
11
|
+
target: 'es2015',
|
|
12
|
+
// minify: 'esbuild',
|
|
13
|
+
minify: false,
|
|
14
|
+
cssTarget: 'chrome80',
|
|
15
|
+
chunkSizeWarningLimit: 2000,
|
|
16
|
+
lib: {
|
|
17
|
+
entry: path.resolve(__dirname, "./src/components/index.js"), //指定组件编译入口文件
|
|
18
|
+
name: "widget.qw",
|
|
19
|
+
fileName: "widget.qw",
|
|
20
|
+
},
|
|
21
|
+
rollupOptions: {
|
|
22
|
+
// 确保外部化处理那些你不想打包进库的依赖
|
|
23
|
+
external: ["vue"],
|
|
24
|
+
output: {
|
|
25
|
+
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
|
|
26
|
+
globals: {
|
|
27
|
+
vue: "Vue",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}, // rollup打包配置
|
|
31
|
+
},
|
|
32
|
+
//打包配置,一定要加,否则路径不对,找不到js/css文件
|
|
33
|
+
//作用:打包index.html中的js/css文件前加相对路径./
|
|
34
|
+
base: "./",
|
|
35
|
+
define: {
|
|
36
|
+
'process.env': {
|
|
37
|
+
VUE_APP_DOMAIN: 'https://www.hbhjhx.asia',
|
|
38
|
+
VUE_APP_TOKEN_KEY: 'Authorization',
|
|
39
|
+
VUE_APP_TOKEN_PREFIX: 'Bearer ',
|
|
40
|
+
VUE_APP_NEED_LOGIN_CODE: 401,
|
|
41
|
+
//注意:发布时 VUE_APP_IS_DEBUG必须配置为false
|
|
42
|
+
// 本地开发时 VUE_APP_IS_DEBUG必须配置为true
|
|
43
|
+
VUE_APP_IS_DEBUG: false,
|
|
44
|
+
// VUE_APP_IS_DEBUG: true,
|
|
45
|
+
VUE_APP_DEBUG_TOKEN: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImZ0ejhnaFpLMWR4ejhnOTFDZkJUMXQxVWNJajF3R3c1In0.tgI4iGOJ8OrjoqWIqC2pjH7J52l6H7wyuUwJATKIVns'
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
resolve: {
|
|
49
|
+
// 配置路径别名
|
|
50
|
+
alias: {
|
|
51
|
+
"@": path.resolve(__dirname, "./src"),
|
|
52
|
+
"*": resolve(""),
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
plugins: [
|
|
56
|
+
vue(),
|
|
57
|
+
// 引入vant的样式依赖
|
|
58
|
+
// styleImport({
|
|
59
|
+
// resolves: [VantResolve()],
|
|
60
|
+
// libs: [
|
|
61
|
+
// {
|
|
62
|
+
// libraryName: 'vant',
|
|
63
|
+
// esModule: true,
|
|
64
|
+
// resolveStyle: (name) => `../es/${name}/style`,
|
|
65
|
+
// },
|
|
66
|
+
// ],
|
|
67
|
+
// }),
|
|
68
|
+
//vite版require配置
|
|
69
|
+
requireTransform({
|
|
70
|
+
fileRegex: /.ts$|.vue$/,
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
};
|