diff --git a/packages/wxwork/AppMaterialLibrary/components/List.vue b/packages/wxwork/AppMaterialLibrary/components/List.vue
index 67d2584e..ed005c0a 100644
--- a/packages/wxwork/AppMaterialLibrary/components/List.vue
+++ b/packages/wxwork/AppMaterialLibrary/components/List.vue
@@ -12,7 +12,7 @@
+ :class="[currIndex === index ? 'active' : '']" @click="currIndex = index, search.current = 1, getList()">
{{ item }}
@@ -36,7 +36,6 @@
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
- v-loading="loading"
style="margin-top: 6px; width: 100%;"
:current.sync="search.current"
:size.sync="search.size"
@@ -61,8 +60,9 @@
@@ -95,9 +95,9 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
+ v-model="form.pagePath">
@@ -160,8 +160,8 @@
v-model="form.content">
-
-
+
+
-
+
+ v-model="form.appId">
@@ -186,8 +186,8 @@
v-model="form.pagePath">
-
-
+
+
@@ -217,51 +217,46 @@
appId: '',
content: '',
fileUrl: [],
+ appid: '',
pagePath: '',
pictureUrl: [],
title: ''
},
+ id: '',
typeList: ['话术', '图片', '小程序', '文件', '视频', '网页'],
currIndex: 0,
tableData: [],
- loading: false,
- total: 0,
- colConfigs: [
+ total: 0
+ }
+ },
+
+ computed: {
+ colConfigs () {
+ return [
{ prop: 'taskTitle', label: '任务名称' },
{ prop: 'typeName', label: '群发类型', align: 'center' },
{ slot: 'user', label: '创建人', openType: 'userName', align: 'center' },
- { prop: 'choiceTime', label: '群发时间', align: 'center' },
- { prop: 'completionRate', label: '任务完成率', align: 'center', format: v => v ? v === '0.0' ? '0%' : `${v}%` : '-' }
+ { prop: 'choiceTime', label: '群发时间', align: 'center' }
]
}
},
created () {
- this.dict.load('mstStatus').then(() => {
- this.getList()
- })
+ this.getList()
},
methods: {
getList() {
- this.loading = true
- this.instance.post(`/app/appmasssendingtask/list`, null, {
+ this.instance.post(`/app/appmaterialinfo/list`, null, {
params: {
...this.search,
+ type: this.currIndex
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
-
- this.$nextTick(() => {
- this.loading = false
- })
- } else {
- this.loading = false
}
- }).catch(() => {
- this.loading = false
})
},
@@ -278,11 +273,17 @@
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/app/appmaterialinfo/addOrUpdate`, {
- ...this.form
+ ...this.form,
+ type: this.currIndex,
+ fileUrl: this.form.fileUrl.length ? this.form.fileUrl[0].url : '',
+ pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : '',
+ fileSizeStr: this.form.fileUrl.length ? this.form.fileUrl[0].fileSizeStr : '',
}).then(res => {
if (res.code == 0) {
this.$message.success('提交成功')
this.isShow = false
+
+ this.getList()
}
})
}
diff --git a/ui/packages/basic/AiUploader.vue b/ui/packages/basic/AiUploader.vue
index dfe1f2b2..48901460 100644
--- a/ui/packages/basic/AiUploader.vue
+++ b/ui/packages/basic/AiUploader.vue
@@ -350,14 +350,29 @@ export default {
this.$message.success('上传成功')
return false
}
- let data = res.data[0].split(';')
- this.fileList.forEach(item => {
- if (item.uid === file.file.uid) {
- item.id = data[1]
- item.path = data[0]
- item.url = data[0]
- }
- })
+
+ if (Object.prototype.toString.call(res.data) === '[object Object]') {
+ this.fileList.forEach(item => {
+ if (item.uid === file.file.uid) {
+ item.id = res.data.id
+ item.path = res.data.url
+ item.url = res.data.url
+ item.url = res.data.url
+ item.fileSizeStr = res.data.fileSizeStr
+ item.postfix = res.data.postfix
+ }
+ })
+ } else {
+ let data = res.data[0].split(';')
+ this.fileList.forEach(item => {
+ if (item.uid === file.file.uid) {
+ item.id = data[1]
+ item.path = data[0]
+ item.url = data[0]
+ }
+ })
+ }
+
this.emitChange(this.fileList)
this.$message.success('上传成功')
}
diff --git a/vue.config.js b/vue.config.js
index e51ef632..d6a00e13 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -57,7 +57,7 @@ module.exports = {
proxy: {
//设置代理,可解决跨5
'/lan': {
- target: 'http://192.168.1.87:39000',
+ target: 'http://192.168.1.87:39010',
changeOrigin: true,
pathRewrite: {
//地址重写