From fa0fc3195858a592d2ad1bdad0fa6126602ebf55 Mon Sep 17 00:00:00 2001
From: zrj <646384940@qq.com>
Date: Fri, 07 Jun 2024 14:17:10 +0800
Subject: [PATCH] 路径配置修改
---
src/views/article/discussionManage.vue | 75 ++++++++++++++++++++++++++++++-------
1 files changed, 60 insertions(+), 15 deletions(-)
diff --git a/src/views/article/discussionManage.vue b/src/views/article/discussionManage.vue
index 4010d28..4f01e64 100644
--- a/src/views/article/discussionManage.vue
+++ b/src/views/article/discussionManage.vue
@@ -19,8 +19,14 @@
编辑议题
</el-button>
- <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row, 1)">
+ <el-button icon="el-icon-user" :size="size" v-if="row.articleType != 4" :type="type"
+ @click.stop="openUserPopup(row, 0)">
参与用户
+ </el-button>
+
+ <el-button icon="el-icon-user" v-if="row.articleType == 4" :size="size" :type="type"
+ @click.stop="handleExport(row)">
+ 导出投票结果
</el-button>
<el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
@@ -60,7 +66,7 @@
add,
getNotice,
upcomment
- } from "@/api/article/article"
+ } from "@/ssoapi/article/article"
import {
getListPd,
@@ -69,16 +75,31 @@
addPd,
getNoticePd,
upcommentPd
- } from "@/api/discuss/publicDiscuss"
+ } from "@/ssoapi/discuss/publicDiscuss"
import website from '@/config/website'
import {
getDistrictTree
- } from "@/api/district/index"
+ } from "@/ssoapi/district/index"
import {
mapGetters
} from "vuex"
import deitDiscussion from "./components/deitDiscussion"
import discussionManageChild from "./components/discussionManageChild"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import Qs from "qs"
+ import {
+ exportBlob
+ } from "@/ssoapi/common"
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
export default {
components: {
@@ -157,6 +178,7 @@
minRows: 2,
tags: true,
type: "tree",
+ dataType: "string",
multiple: true,
dicData: [],
rules: [{
@@ -168,7 +190,7 @@
label: "name",
value: 'id'
},
- hide: true,
+ // hide: true,
},
{
width: 110,
@@ -177,7 +199,7 @@
// align:'center',
type: "upload",
listType: "picture-img",
- action: "/api/blade-resource/oss/endpoint/put-file",
+ action: "/ssoapi/blade-resource/oss/endpoint/put-file",
propsHttp: {
res: "data",
url: "link",
@@ -194,7 +216,7 @@
viewDisplay: true,
searchSpan: 4,
checkStrictly: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=investigateType",
+ dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=investigateType",
props: {
label: "dictValue",
value: "dictKey",
@@ -291,7 +313,7 @@
hide: true,
span: 24,
listType: "picture-img",
- action: "/api/depl/put-depl",
+ action: "/ssoapi/depl/put-depl",
propsHttp: {
url: "data",
},
@@ -301,7 +323,7 @@
prop: "content",
component: "AvueUeditor",
options: {
- action: "/api/blade-resource/oss/endpoint/put-file",
+ action: "/ssoapi/blade-resource/oss/endpoint/put-file",
// customConfig: {
// lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
// },//wangEditor编辑的配置
@@ -488,6 +510,29 @@
}
},
methods: {
+ handleExport(row) {
+ this.$confirm("是否导出投票结果数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ this.query = {}
+ this.query.articleId = row.id
+ this.query.districtId = row.articleRange
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/ssoapi/blade-userTopics/userTopics/exportDataIndex?${this.website.tokenHeader}=${getToken()}&` + data)
+ .then(
+ res => {
+ downloadXls(res.data, `投票结果${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
iscommentInput(e, data) {
upcomment(data.id, e).then(() => {
this.$message({
@@ -513,8 +558,8 @@
})
},
- openUserPopup(row) {
- this.$refs.DeitDiscussion.openUser(row)
+ openUserPopup(row, type) {
+ this.$refs.DeitDiscussion.openUser(row, type)
},
openDilog(row, type) {
@@ -529,7 +574,7 @@
row.videoUrl = ""
}
row.userid = this.userInfo.user_id
- row.articleRange = JSON.stringify(row.articleList)
+ row.articleRange = row.articleList
if (row.url.length > 0) {
var urls = []
var split = row.url.split(",")
@@ -559,7 +604,7 @@
)
},
rowUpdate(row, index, done, loading) {
- row.articleRange = JSON.stringify(row.articleList)
+ row.articleRange = row.articleList
if (row.url.length > 0) {
var urls = []
var split = row.url.split(",")
@@ -657,7 +702,7 @@
// })
this.form = {
...data,
- articleList: JSON.parse(data.articleRange)
+ articleList: data.articleRange
}
})
}
@@ -697,7 +742,7 @@
this.page.total = data.total
this.data = data.records
this.data.forEach(item => {
- // item.articleRange = JSON.parse(item.articleRange)
+ item.articleList = item.articleRange
if (item.url.length > 0) {
var urls = []
var names = item.url.split(",")
--
Gitblit v1.9.3