look-ui 1.1.11 → 1.1.12

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 ADDED
@@ -0,0 +1,16 @@
1
+ # look-ui
2
+
3
+ # 鹿鸣前端组件包
4
+
5
+ ## 如何新建组件?
6
+ 1. 在 packages 目录下新建组件文件夹, 名字为 look-xxx, 目录结构参考现有组件
7
+ 2. 在 packages/index.js 文件中引入该组件即可
8
+
9
+ ## 如何打包成组件库?
10
+ 1. 在终端执行 `npm run lib` 命令即可
11
+
12
+ ## 如何发布到 npm ?
13
+ 1. 修改 package.json 中的 version 版本号
14
+ 2. 修改 npm 源为 npm 官方源, 否则在第3步会报错, 在终端执行 `npm config set registry https://registry.npmjs.org/`
15
+ 3. 执行 `npm login` , 登录 npm 账号
16
+ 4. 执行 `npm publish` 发布到 npm 官方源
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "look-ui",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "a ui library which is based on element-ui",
5
5
  "main": "./dist/look-ui.common.js",
6
6
  "scripts": {
@@ -10,7 +10,10 @@
10
10
  "test": "echo \"Error: no test specified\" && exit 1"
11
11
  },
12
12
  "dependencies": {
13
+ "axios": "^1.5.1",
13
14
  "core-js": "^3.8.3",
15
+ "element-ui": "^2.15.14",
16
+ "qs": "^6.11.2",
14
17
  "sass": "^1.63.6",
15
18
  "sass-loader": "^13.3.2",
16
19
  "vue": "^2.6.14"
package/src/App.vue ADDED
@@ -0,0 +1,197 @@
1
+ <template>
2
+ <div class="app">
3
+ <look-dulplicate-checking
4
+ :loadingCheckResultList="loadingCheckResultList"
5
+ :noDealSimilarList="noDealSimilarList"
6
+ :noDealDissimilarList="noDealDissimilarList"
7
+ :hadDealSimilarList="hadDealSimilarList"
8
+ :hadDealDissimilarList="hadDealDissimilarList"
9
+ :checkingResultList="checkingResultList"
10
+ @mission-click="handleMissionClick"
11
+ @toggle-source="toggleSource"
12
+ @detail-click="handleDetailClick"
13
+ @subscription-click="handleSubscribe"
14
+ @merging-click="handleMerge"
15
+ @insertion-click="handleInsert"
16
+ @onClickNoDealSimilar="onClickNoDealSimilar" />
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import { searchRepeated } from '../utils/api.js';
22
+ export default {
23
+ data() {
24
+ return {
25
+ loadingCheckResultList: false,
26
+ allCheckingResultList: [],
27
+ // 未处理任务-存在相似任务列表
28
+ noDealSimilarList: [
29
+ {
30
+ taskId: '1',
31
+ name: '三亚市第一艘海洋休闲渔船',
32
+ checked: false,
33
+ tenantId: '4602000038',
34
+ checkResultListLength: 0,
35
+ },
36
+ {
37
+ taskId: '2',
38
+ name: '事项工作内容',
39
+ checked: false,
40
+ tenantId: '4602000038',
41
+ checkResultListLength: 0,
42
+ },
43
+ ],
44
+ // 未处理任务-不存在相似任务列表
45
+ noDealDissimilarList: [
46
+ {
47
+ taskId: '1',
48
+ name: '三亚市第一艘海洋休闲渔船',
49
+ checked: false,
50
+ tenantId: '4602000038',
51
+ checkResultListLength: 0,
52
+ },
53
+ {
54
+ taskId: '2',
55
+ name: '事项工作内容',
56
+ checked: false,
57
+ tenantId: '4602000038',
58
+ checkResultListLength: 0,
59
+ },
60
+ ],
61
+ // 已处理任务-存在相似任务列表
62
+ hadDealSimilarList: [
63
+ {
64
+ title:
65
+ '春风验荡。历经百年沧桑的南非比勒陀利亚总统府,习近平主席同拉马福萨总统并肩而立,俯瞰欣欣向荣的城。',
66
+ checked: false,
67
+ matchingResultCount: 8,
68
+ checkResultList: [
69
+ { name: '省政府督查', count: 3 },
70
+ { name: '省委督查', count: 3 },
71
+ { name: '深改办(自贸办)', count: 2 },
72
+ ],
73
+ status: 3,
74
+ relation:
75
+ '《习近平主席出席金砖国家领导人第十五次会晤并对南非进行国事访问。立足南非和金砖,放眼非洲和世 界。》',
76
+ },
77
+ {
78
+ title:
79
+ '春风验荡。历经百年沧桑的南非比勒陀利亚总统府,习近平主席同拉马福萨总统并肩而立,俯瞰欣欣向荣的城。',
80
+ checked: false,
81
+ matchingResultCount: 8,
82
+ checkResultList: [
83
+ { name: '省政府督查', count: 3 },
84
+ { name: '省委督查', count: 3 },
85
+ { name: '深改办(自贸办)', count: 2 },
86
+ ],
87
+ status: 3,
88
+ relation:
89
+ '《习近平主席出席金砖国家领导人第十五次会晤并对南非进行国事访问。立足南非和金砖,放眼非洲和世 界。》',
90
+ },
91
+ ],
92
+ // 已处理任务-不存在相似任务列表
93
+ hadDealDissimilarList: [
94
+ {
95
+ title:
96
+ '春风验荡。历经百年沧桑的南非比勒陀利亚总统府,习近平主席同拉马福萨总统并肩而立,俯瞰欣欣向荣的城。',
97
+ checked: false,
98
+ status: 3,
99
+ relation:
100
+ '《习近平主席出席金砖国家领导人第十五次会晤并对南非进行国事访问。立足南非和金砖,放眼非洲和世 界。》',
101
+ },
102
+ {
103
+ title:
104
+ '春风验荡。历经百年沧桑的南非比勒陀利亚总统府,习近平主席同拉马福萨总统并肩而立,俯瞰欣欣向荣的城。',
105
+ checked: false,
106
+ status: 3,
107
+ relation:
108
+ '《习近平主席出席金砖国家领导人第十五次会晤并对南非进行国事访问。立足南非和金砖,放眼非洲和世 界。》',
109
+ },
110
+ {
111
+ title:
112
+ '春风验荡。历经百年沧桑的南非比勒陀利亚总统府,习近平主席同拉马福萨总统并肩而立,俯瞰欣欣向荣的城。',
113
+ checked: false,
114
+ status: 3,
115
+ relation:
116
+ '《习近平主席出席金砖国家领导人第十五次会晤并对南非进行国事访问。立足南非和金砖,放眼非洲和世 界。》',
117
+ },
118
+ ],
119
+ checkingResultList: [],
120
+ };
121
+ },
122
+ created() {
123
+ searchRepeated(this.paramsData).then(res => {
124
+ this.allCheckingResultList = res.data.data;
125
+ this.allCheckingResultList.forEach(item => {
126
+ this.noDealSimilarList.forEach(iten => {
127
+ if (item.keyId == iten.taskId) {
128
+ iten.checkResultListLength = item.size;
129
+ }
130
+ });
131
+ });
132
+ this.getCurrMissionCheckingResultList(0);
133
+ });
134
+ },
135
+ computed: {
136
+ paramsData() {
137
+ return {
138
+ from: 0,
139
+ jsonStr: JSON.stringify(this.noDealSimilarList),
140
+ keyId: 'taskId',
141
+ modelIndex: 'common_task',
142
+ modelType: 'task',
143
+ names: 'name',
144
+ size: 10000,
145
+ }
146
+ }
147
+ },
148
+ methods: {
149
+ fetchCheckingResultList(index) {
150
+ this.loadingCheckResultList = true
151
+ searchRepeated(this.paramsData).then(res => {
152
+ this.allCheckingResultList = res.data.data;
153
+ this.getCurrMissionCheckingResultList(index)
154
+ })
155
+ },
156
+ handleDetailClick() {
157
+
158
+ },
159
+ onClickNoDealSimilar(index) {
160
+ this.getCurrMissionCheckingResultList(index)
161
+ },
162
+ getCurrMissionCheckingResultList(index) {
163
+ this.loadingCheckResultList = true
164
+ setTimeout(() => {
165
+ const currentMissionKeyId = this.noDealSimilarList[index].taskId;
166
+ const resObj = this.allCheckingResultList.find(item => item.keyId == currentMissionKeyId) || {};
167
+ this.checkingResultList = resObj.hitRes || [];
168
+ this.loadingCheckResultList = false;
169
+ }, 500)
170
+ },
171
+ handleMissionClick(row) {
172
+ console.log('row', row);
173
+ },
174
+ toggleSource(val, index) {
175
+ this.paramsData.names = val.toString()
176
+ this.fetchCheckingResultList(index)
177
+ },
178
+ // 关注
179
+ handleSubscribe(row) {
180
+ console.log('row', row);
181
+ },
182
+ // 归并
183
+ handleMerge(row) {
184
+ console.log('row', row);
185
+ },
186
+ // 插入
187
+ handleInsert(row) {
188
+ console.log('row', row);
189
+ },
190
+ },
191
+ };
192
+ </script>
193
+ <style>
194
+ .app {
195
+ height: 100%;
196
+ }
197
+ </style>
package/src/main.js ADDED
@@ -0,0 +1,14 @@
1
+ import Vue from 'vue';
2
+ import App from './App.vue';
3
+ import ElementUI from 'element-ui';
4
+ import 'element-ui/lib/theme-chalk/index.css';
5
+ import LookUI from '../packages/index.js';
6
+ import '../style/index.scss';
7
+ import './normalize.css'
8
+
9
+ Vue.config.productionTip = false;
10
+ Vue.use(ElementUI);
11
+ Vue.use(LookUI);
12
+ new Vue({
13
+ render: h => h(App),
14
+ }).$mount('#app');
@@ -0,0 +1,9 @@
1
+ html,body {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
5
+
6
+ html,body {
7
+ width: 100%;
8
+ height: 100%;
9
+ }
package/utils/api.js ADDED
@@ -0,0 +1,13 @@
1
+ import request from './request';
2
+ import Qs from 'qs';
3
+
4
+ export const searchRepeated = function (data) {
5
+ return request({
6
+ url: `/api/searchRepeated/batchSearch`,
7
+ method: 'post',
8
+ headers: {
9
+ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
10
+ },
11
+ data: Qs.stringify(data),
12
+ });
13
+ };
@@ -0,0 +1,26 @@
1
+ import axios from 'axios';
2
+
3
+ const service = axios.create({
4
+ timeout: 5 * 60000,
5
+ });
6
+
7
+ service.interceptors.request.use(
8
+ config => {
9
+ return config;
10
+ },
11
+ error => {
12
+ console.log(error);
13
+ Promise.reject(error);
14
+ }
15
+ );
16
+
17
+ service.interceptors.response.use(
18
+ res => {
19
+ return res
20
+ },
21
+ error => {
22
+ return Promise.reject(error);
23
+ }
24
+ );
25
+
26
+ export default service;