askbot-dragon 0.7.33 → 0.7.36

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": "askbot-dragon",
3
- "version": "0.7.33",
3
+ "version": "0.7.36",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1,77 +1,111 @@
1
1
  <template>
2
- <div class="asset-details">
3
- <section class="details-title">
4
- <p>您正在咨询</p>
5
- <span @click="rotateClick" :class="rotateFlag ? 'rotate' : ''">
6
- <i class="arsenal_icon arsenalangle-up-solid"></i>
7
- </span>
8
- </section>
9
- <div class="details-content">
10
- <img
11
- class="backgroundImg"
12
- v-if="dataDetails.product.productImgPathes"
13
- :src="dataDetails.product.productImgPathes"
14
- alt=""
15
- />
16
- <div class="background-null" v-else>
17
- {{ dataDetails.productName[0] | filterName }}
2
+ <div class="asset">
3
+ <div class="asset-details">
4
+ <section class="details-title">
5
+ <p>您正在咨询</p>
6
+ <span @click="rotateClick" :class="rotateFlag ? 'rotate' : ''">
7
+ <i class="arsenal_icon arsenalangle-up-solid"></i>
8
+ </span>
9
+ </section>
10
+ <div class="details-content">
11
+ <img
12
+ class="backgroundImg"
13
+ v-if="dataDetails.product.productImgPathes.length != 0"
14
+ :src="dataDetails.product.productImgPathes"
15
+ alt=""
16
+ />
17
+ <div class="background-null" v-else>
18
+ {{ dataDetails.productName[0] | filterName }}
19
+ </div>
20
+ <div class="content-text">
21
+ <p class="text-title">{{ dataDetails.productName }}</p>
22
+ <section class="text-label">
23
+ <p class="text-type">
24
+ <i class="iconfont guoran-biaoqian"></i>
25
+ <span>{{
26
+ dataDetails.typeName ? dataDetails.typeName : "--"
27
+ }}</span>
28
+ </p>
29
+ <p class="text-SN">
30
+ <i class="iconfont guoran-xinghao"></i>
31
+ <span>{{ dataDetails.snNo ? dataDetails.snNo : "--" }}</span>
32
+ </p>
33
+ </section>
34
+ </div>
18
35
  </div>
19
- <div class="content-text">
20
- <p class="text-title">{{ dataDetails.productName }}</p>
21
- <section class="text-label">
22
- <p class="text-type">
23
- <i class="iconfont guoran-biaoqian"></i>
24
- <span>{{
25
- dataDetails.typeName ? dataDetails.typeName : "--"
26
- }}</span>
27
- </p>
28
- <p class="text-SN">
29
- <i class="iconfont guoran-xinghao"></i>
30
- <span>{{ dataDetails.snNo ? dataDetails.snNo : "--" }}</span>
31
- </p>
32
- </section>
36
+ <div class="details-content-hide" v-if="rotateFlag">
37
+ <p>
38
+ <i class="iconfont guoran-miaoshu"></i>
39
+ <section class="description">
40
+ <section class="img-view" v-if="imgList.length != 0">
41
+ <template v-for="(item,index) in imgList">
42
+ <img :src="item" alt="" :key="index">
43
+ </template>
44
+ </section>
45
+ </section>
46
+ <b>{{ dataDetails.description ? dataDetails.description : "--" }}</b>
47
+ </p>
48
+ <p>
49
+ <i class="arsenal_icon arsenalweizhi"></i>
50
+ <span> {{ dataDetails.officeAreaName }} </span>
51
+ </p>
52
+ <p>
53
+ <i class="iconfont guoran-geren"></i>
54
+ <span
55
+ v-if="
56
+ dataDetails.users.length != 0 &&
57
+ dataDetails.users.type == 0 &&
58
+ dataDetails.users.bindType == 0
59
+ "
60
+ >
61
+ <ww-open-data
62
+ type="userName"
63
+ :openid="dataDetails.users[0].name"
64
+ ></ww-open-data>
65
+ </span>
66
+ <span v-else>
67
+ {{ dataDetails.users[0] ? dataDetails.users[0].name : "--" }}
68
+ </span>
69
+ </p>
70
+ <p>
71
+ <i class="iconfont guoran-bumen"></i>
72
+ <span
73
+ v-if="
74
+ dataDetails.depts.length != 0 &&
75
+ dataDetails.depts[0].wechatBotDTO &&
76
+ dataDetails.depts[0].wechatBotDTO.wechatType == 0 &&
77
+ dataDetails.depts[0].wechatBotDTO.bindType == 0
78
+ "
79
+ >
80
+ <ww-open-data
81
+ type="departmentName"
82
+ :openid="dataDetails.depts[0].name"
83
+ ></ww-open-data>
84
+ </span>
85
+ <span v-else>
86
+ {{ dataDetails.depts[0] ? dataDetails.depts[0].name : "--" }}
87
+ </span>
88
+ </p>
89
+ <p>
90
+ <i class="iconfont guoran-guanlizhe"></i>
91
+ <span
92
+ v-if="
93
+ dataDetails.managers.length != 0 &&
94
+ dataDetails.managers.type == 0 &&
95
+ dataDetails.managers.bindType == 0
96
+ "
97
+ >
98
+ <ww-open-data
99
+ type="userName"
100
+ :openid="dataDetails.managers[0].name"
101
+ ></ww-open-data>
102
+ </span>
103
+ <span>
104
+ {{ dataDetails.managers[0] ? dataDetails.managers[0].name : "--" }}
105
+ </span>
106
+ </p>
33
107
  </div>
34
108
  </div>
35
- <div class="details-content-hide" v-if="rotateFlag">
36
- <p>
37
- <i class="iconfont guoran-miaoshu"></i>
38
- <span>{{ dataDetails.description }}</span>
39
- </p>
40
- <p>
41
- <i class="arsenal_icon arsenalweizhi"></i>
42
- <span> {{ dataDetails.officeAreaName }} </span>
43
- </p>
44
- <p>
45
- <i class="iconfont guoran-geren"></i>
46
- <span>
47
- {{
48
- dataDetails.userName && dataDetails.userName.length != 0
49
- ? dataDetails.userName[0]
50
- : "--"
51
- }}
52
- </span>
53
- </p>
54
- <p>
55
- <i class="iconfont guoran-bumen"></i>
56
- <span>
57
- {{
58
- dataDetails.deptNames && dataDetails.deptNames.length != 0
59
- ? dataDetails.deptNames[0]
60
- : "--"
61
- }}
62
- </span>
63
- </p>
64
- <p>
65
- <i class="iconfont guoran-guanlizhe"></i>
66
- <span>
67
- {{
68
- dataDetails.managerNames && dataDetails.managerNames.length != 0
69
- ? dataDetails.managerNames[0]
70
- : "--"
71
- }}
72
- </span>
73
- </p>
74
- </div>
75
109
  </div>
76
110
  </template>
77
111
 
@@ -86,6 +120,7 @@ export default {
86
120
  return {
87
121
  detailVisable: false,
88
122
  rotateFlag: true,
123
+ imgList: [],
89
124
  };
90
125
  },
91
126
  filters: {
@@ -103,18 +138,34 @@ export default {
103
138
  },
104
139
  computed: {
105
140
  dataDetails() {
106
- let dataDetails = this.data;
107
- let reg = /<\/?.+?\/?>/g;
108
- dataDetails.description = this.data.description
109
- ? this.data.description.replace(reg, "")
110
- : "";
141
+ let dataDetails = this.data.assets;
142
+ if (dataDetails.description) {
143
+ let reg = /<\/?.+?\/?>/g;
144
+ let imgReg = /<img.*?(?:>|\/>)/gi;
145
+ //匹配src属性
146
+ let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i;
147
+ let arr = dataDetails.description.match(imgReg);
148
+ if (arr) {
149
+ for (var i = 0; i < arr.length; i++) {
150
+ var src = arr[i].match(srcReg);
151
+ if (src[1]) {
152
+ this.imgList.push(src[1]);
153
+ }
154
+ }
155
+ }
156
+ dataDetails.description =
157
+ dataDetails.description &&
158
+ dataDetails.description.replace(/&nbsp;/gi, "");
159
+ dataDetails.description = dataDetails.description
160
+ ? dataDetails.description.replace(reg, "")
161
+ : "";
162
+ }
111
163
  return dataDetails;
112
164
  },
113
165
  },
114
166
  methods: {
115
167
  rotateClick() {
116
168
  this.rotateFlag = !this.rotateFlag;
117
- console.log(this.rotateFlag);
118
169
  },
119
170
  },
120
171
  };
@@ -122,6 +173,11 @@ export default {
122
173
 
123
174
  <style lang="less" scoped>
124
175
  @import url("../assets/less/iconfont.css");
176
+ .asset {
177
+ width: 100%;
178
+ box-sizing: border-box;
179
+ padding: 8px 15px;
180
+ }
125
181
  .asset-details {
126
182
  width: 100%;
127
183
  // height: 130px;
@@ -197,6 +253,7 @@ export default {
197
253
  .text-label {
198
254
  width: 100%;
199
255
  display: flex;
256
+ flex-wrap: wrap;
200
257
  p {
201
258
  margin-right: 10px;
202
259
  display: flex;
@@ -232,7 +289,7 @@ export default {
232
289
  }
233
290
  .details-content-hide {
234
291
  width: 100%;
235
- height: 140px;
292
+ min-height: 140px;
236
293
  box-sizing: border-box;
237
294
  padding: 10px 15px;
238
295
  border-top: 1px solid #eeeeee;
@@ -245,6 +302,22 @@ export default {
245
302
  color: #366aff;
246
303
  }
247
304
  }
305
+ .description {
306
+ max-width: 70%;
307
+ .img-view {
308
+ width: 100%;
309
+ display: flex;
310
+ flex-direction: row;
311
+ flex-wrap: wrap;
312
+ justify-content: space-between;
313
+ align-items: center;
314
+ img {
315
+ width: 33%;
316
+ height: 33%;
317
+ margin-bottom: 5px;
318
+ }
319
+ }
320
+ }
248
321
  }
249
322
  }
250
323
  </style>