@huilian/components-tms 1.1.13 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huilian/components-tms",
3
- "version": "1.1.13",
3
+ "version": "1.2.0",
4
4
  "scripts": {
5
5
  "dev": "npx rollup -wc rollup.config.dev.js",
6
6
  "build": "npx rollup -c rollup.config.js && npm run build:types",
package/readme.md CHANGED
@@ -5,3 +5,95 @@
5
5
  * package.json 里的file 是打包产物输出文件过滤只输出构建后产物路径
6
6
  * 这包项目里基本都是后台element为主的 二次包装组件 所以一些依赖是项目本身就有的 这单要注意
7
7
  * 参考components里的实际组件UploadFile 开发就行了 hellovue和mybutton是例子
8
+
9
+
10
+ ```html
11
+ // template-key 代表表头key
12
+ // get-api是业务接口
13
+ // requesFn 是接口请求库 可以自定义
14
+ // scheme 代表组件
15
+ <form-table-scheme ref="scheme" searchPlaceholder= '车牌号/VIN码/车型名称/车辆资产归属' :requestFn="requestFn" :template-key="templateKey" :get-api="getApi" >
16
+ // 左侧的按钮 slot
17
+ <template v-slot:leftBtn>
18
+ <el-button type="primary" @click="dialogVisible = true" >导入</el-button>
19
+ <el-button icon="el-icon-download" @click="exportFile">导出</el-button>
20
+ <el-button icon="el-icon-download" @click="jump">车辆监控</el-button>
21
+ </template>
22
+ // xxxHeader 是?提示的钩子 是以对照的key 比如下面的deviceId + Header关键字来做的
23
+ <template #deviceIdHeader>
24
+ 车辆行驶证上车辆识别代码
25
+ </template>
26
+ // 比如要对status 做特殊处理 就可以这样来 props代表列表数据, queryConfig 是列表所代表的配置
27
+ <template #status="{props,queryConfig}">
28
+ <el-tag :type="tagArr[props.status]">
29
+ {{ queryConfig.rule.option.find(i => i.value == props.status ).label }}
30
+ </el-tag>
31
+ </template>
32
+ // 操作拦按钮 props代表列表数据
33
+ <template #actionBtn="{props}">
34
+ <el-button type="text" @click="jumpInfo(props)">合同详情</el-button>
35
+ </template>
36
+ </form-table-scheme>
37
+ <script>
38
+ export default {
39
+ methods: {
40
+ exportFile(){
41
+ //导出 ops是接口请求参数
42
+ const data = this.$refs.scheme.ops
43
+ delete data.pageSize;
44
+ delete data.skipCount;
45
+ download('/areaOperate/billcs/exportBillList',data)
46
+ },
47
+ selectCur(cur) {
48
+ const { value, name } = cur
49
+ // this.$refs.scheme.getList 组件的请求勾子函数
50
+ this.$refs.scheme.getList({ planDueDateFrom: value[0],planDueDateTo:value[1] })
51
+
52
+ }
53
+ },
54
+ }
55
+
56
+
57
+ </script>
58
+ ```
59
+
60
+
61
+ ```html
62
+ 表格配置
63
+ // dateRange 区间时间
64
+ {
65
+ "name": "申请时间", //非必要
66
+ "format": "YYYY-MM-DD HH:mm:ss", // 必要格式化
67
+ "searchKey": [ // 区间时间会有两个key
68
+ "execTimeStart",
69
+ "execTimeEnd"
70
+ ]
71
+ }
72
+ // check 选择框
73
+ {
74
+ "searchKey": "applyStatusList", // 一般情况下是对应的col值 但是有时候查询和col对不上需要手动配置searchKey
75
+ "option": [ // option就是对照数组
76
+ {
77
+ "label": "待审核",
78
+ "value": "TO_AUDIT"
79
+ },
80
+ {
81
+ "label": "已经审核",
82
+ "value": "AUDIT"
83
+ },
84
+ {
85
+ "label": "驳回",
86
+ "value": "REJECT"
87
+ },
88
+ {
89
+ "label": "撤回",
90
+ "value": "CANCEL"
91
+ },
92
+ {
93
+ "label": "关闭",
94
+ "value": "CLOSE"
95
+ }
96
+ ]
97
+ }
98
+
99
+ ```