askbot-dragon 0.9.1 → 0.9.4
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/babel.config.js +4 -3
- package/package.json +1 -3
- package/public/index.html +13 -0
- package/src/components/formTemplate.vue +26 -1
- package/src/main.js +5 -5
- package/vue.config.js +5 -1
package/babel.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askbot-dragon",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"serve": "vue-cli-service serve",
|
|
6
6
|
"build": "vue-cli-service build",
|
|
@@ -12,11 +12,9 @@
|
|
|
12
12
|
"ali-oss": "^6.2.1",
|
|
13
13
|
"ckeditor": "^4.12.1",
|
|
14
14
|
"core-js": "^3.6.5",
|
|
15
|
-
"element-ui": "^2.13.2",
|
|
16
15
|
"install": "^0.13.0",
|
|
17
16
|
"jquery": "^3.5.1",
|
|
18
17
|
"uuid": "^8.3.2",
|
|
19
|
-
"vant": "^2.10.14",
|
|
20
18
|
"vconsole": "^3.9.1",
|
|
21
19
|
"vue": "^2.6.11",
|
|
22
20
|
"vue-resource": "^1.5.1",
|
package/public/index.html
CHANGED
|
@@ -13,6 +13,19 @@
|
|
|
13
13
|
<link rel="stylesheet" href="//at.alicdn.com/t/font_2913049_aukej8oi7nm.css"/>
|
|
14
14
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
|
15
15
|
<script src="https://static.guoranbot.com/ckeditor5-build-classic/0.3.7/build/ckeditor.js"></script>
|
|
16
|
+
|
|
17
|
+
<!-- vue -->
|
|
18
|
+
<script src="https://static.guoranbot.com/vue/2.6.11/dist/vue.min.js"></script>
|
|
19
|
+
<script src="https://static.guoranbot.com/vue-router/3.3.2/dist/vue-router.min.js"></script>
|
|
20
|
+
|
|
21
|
+
<!-- element -->
|
|
22
|
+
<script src="https://static.guoranbot.com/element-ui/2.13.2/lib/index.js"></script>
|
|
23
|
+
<link rel="stylesheet" href="https://static.guoranbot.com/element-ui/2.13.2/lib/theme-chalk/index.css">
|
|
24
|
+
|
|
25
|
+
<!-- vant -->
|
|
26
|
+
<script src="https://static.guoranbot.com/vant/2.12/lib/vant.min.js"></script>
|
|
27
|
+
<link rel="stylesheet" href="https://static.guoranbot.com/vant/2.12/lib/index.css" />
|
|
28
|
+
|
|
16
29
|
<style>
|
|
17
30
|
*{
|
|
18
31
|
margin: 0;
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
v-model="item.value"
|
|
64
64
|
:config="{...ckeditor.editorConfig,placeholder:item.formField.extInfo && item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'}"
|
|
65
65
|
v-else-if="item.fieldId==='workorder_description'"
|
|
66
|
+
@ready="(editor)=>currentEditor=editor"
|
|
66
67
|
></ckeditor>
|
|
67
68
|
<el-date-picker
|
|
68
69
|
v-model=item.value
|
|
@@ -862,7 +863,8 @@ export default {
|
|
|
862
863
|
refDefaultValue:{},
|
|
863
864
|
selectOptionWidth:null,
|
|
864
865
|
fieldValue:{},
|
|
865
|
-
optionsList:{}
|
|
866
|
+
optionsList:{},
|
|
867
|
+
currentEditor:null
|
|
866
868
|
}
|
|
867
869
|
},
|
|
868
870
|
props: {
|
|
@@ -1368,6 +1370,29 @@ export default {
|
|
|
1368
1370
|
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = name
|
|
1369
1371
|
}
|
|
1370
1372
|
}
|
|
1373
|
+
/*如何工单描述中只有一个链接地址,则将链接地址替换成图片*/
|
|
1374
|
+
if (this.formList.form.formFieldRelation[i].fieldId === 'workorder_description' &&
|
|
1375
|
+
this.formList.form.formFieldRelation[i].value.search(/<img /i) < 0 &&
|
|
1376
|
+
this.formList.form.formFieldRelation[i].value.indexOf('https://guoranopen-zjk')!==-1){
|
|
1377
|
+
let value = this.formList.form.formFieldRelation[i].value
|
|
1378
|
+
this.formList.form.formFieldRelation[i].value = ""
|
|
1379
|
+
let blob = null
|
|
1380
|
+
let file = null
|
|
1381
|
+
let xhr = new XMLHttpRequest()
|
|
1382
|
+
xhr.open('GET', value)
|
|
1383
|
+
xhr.responseType = 'blob'
|
|
1384
|
+
// 加载时处理(异步)
|
|
1385
|
+
xhr.onload = (res) => {
|
|
1386
|
+
// 获取返回结果
|
|
1387
|
+
blob = xhr.response
|
|
1388
|
+
file = new File([blob],'图片')
|
|
1389
|
+
let obj = {
|
|
1390
|
+
file:[file]
|
|
1391
|
+
}
|
|
1392
|
+
this.currentEditor.commands.get("imageUpload").execute(obj)
|
|
1393
|
+
}
|
|
1394
|
+
xhr.send()
|
|
1395
|
+
}
|
|
1371
1396
|
}
|
|
1372
1397
|
for (let i = 0; i < this.formList.form.formFieldRelation.length; i++) {
|
|
1373
1398
|
let type = this.formList.form.formFieldRelation[i].formField.type
|
package/src/main.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
2
|
import App from './App.vue'
|
|
3
3
|
import VueResource from 'vue-resource'
|
|
4
|
-
import ElementUI from 'element-ui';
|
|
4
|
+
// import ElementUI from 'element-ui';
|
|
5
5
|
import { requestUrl } from './api/index';
|
|
6
6
|
import { utils } from '../src/components/utils/index';
|
|
7
7
|
/*import 'element-ui/lib/theme-chalk/index.css';*/
|
|
8
8
|
import './assets/theme/index.css'
|
|
9
9
|
import 'video.js/dist/video-js.css'
|
|
10
|
-
import Vant from 'vant';
|
|
11
|
-
import 'vant/lib/index.css';
|
|
10
|
+
// import Vant from 'vant';
|
|
11
|
+
// import 'vant/lib/index.css';
|
|
12
12
|
|
|
13
13
|
import CKEditor from '@ckeditor/ckeditor5-vue';
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ const vConsole = new VConsole();
|
|
|
18
18
|
Vue.use(vConsole);*/
|
|
19
19
|
import $ from 'jquery'
|
|
20
20
|
Vue.prototype._$ = $;
|
|
21
|
-
Vue.use(Vant);
|
|
21
|
+
// Vue.use(Vant);
|
|
22
22
|
Date.prototype.Format = function (fmt) { //author: meizz
|
|
23
23
|
var o = {
|
|
24
24
|
"M+": this.getMonth() + 1, //月份
|
|
@@ -36,7 +36,7 @@ Date.prototype.Format = function (fmt) { //author: meizz
|
|
|
36
36
|
}
|
|
37
37
|
Vue.config.productionTip = false
|
|
38
38
|
Vue.use(VueResource)
|
|
39
|
-
Vue.use(ElementUI)
|
|
39
|
+
// Vue.use(ElementUI)
|
|
40
40
|
Vue.prototype.requestUrl = requestUrl;
|
|
41
41
|
Vue.prototype.utils = utils;
|
|
42
42
|
|
package/vue.config.js
CHANGED
|
@@ -36,7 +36,11 @@ module.exports = {
|
|
|
36
36
|
},
|
|
37
37
|
configureWebpack: {
|
|
38
38
|
externals: {
|
|
39
|
-
|
|
39
|
+
'vue': 'Vue',
|
|
40
|
+
// 属性名称 element-ui, 表示遇到 import xxx from 'element-ui' 这类引入 'element-ui'的,
|
|
41
|
+
// 不去 node_modules 中找,而是去找 全局变量 ELEMENT
|
|
42
|
+
'element-ui': 'ELEMENT',
|
|
43
|
+
'vant': 'Vant',
|
|
40
44
|
'ckeditor': 'CKEDITOR',
|
|
41
45
|
},
|
|
42
46
|
},
|