Commit 6a2013c5 by Lyan

bug修改

parent 1c264e08
......@@ -4,18 +4,18 @@
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="130px">
<el-form-item label="原始标题" prop="titleOld">
<el-form-item label="原始标题" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo"></el-input>
</el-form-item>
<el-form-item label="显示标题" prop="title">
<el-form-item label="显示标题" prop="title">
<el-input v-model="dataForm.title" placeholder="请输入显示标题" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.title}}</p>
</el-form-item>
<el-form-item label="跳转至" prop="directpath">
<el-form-item label="跳转至" prop="directpath">
<el-input v-model="dataForm.directpath" placeholder="请输入跳转地址" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.directpath}}</p>
</el-form-item>
<el-form-item label='级别' prop='levels'>
<el-form-item label='级别' prop='levels'>
<el-select v-model="dataForm.levels" placeholder="请输入级别" v-show="!showInfo">
<el-option
v-for="item in piclevelList"
......@@ -26,19 +26,19 @@
</el-select>
<p v-show="showInfo">{{dataForm.levels}}</p>
</el-form-item>
<el-form-item label="关键字" prop="keyword">
<el-form-item label="关键字" prop="keyword">
<el-input v-model="dataForm.keyword" placeholder="请输入关键字" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.keyword}}</p>
</el-form-item>
<el-form-item label="演讲人" prop="author">
<el-form-item label="演讲人" prop="author">
<el-input v-model="dataForm.author" placeholder="请输入演讲人" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.author}}</p>
</el-form-item>
<el-form-item label="长度" prop="longStr">
<el-form-item label="长度" prop="longStr">
<el-input v-model="dataForm.longStr" placeholder="请输入长度" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.longStr}}</p>
</el-form-item>
<el-form-item label="时间" prop="stdate">
<el-form-item label="时间" prop="stdate">
<!-- <el-date-picker
v-show="!showInfo"
......@@ -50,7 +50,7 @@
<el-input v-model="dataForm.stdate" placeholder="请输入时间" v-show="!showInfo"></el-input>
<p v-show="showInfo">{{dataForm.stdate}}</p>
</el-form-item>
<el-form-item label='语种' prop='clanguage'>
<el-form-item label='语种' prop='clanguage'>
<el-select v-model="dataForm.clanguage" placeholder="请输入级别" v-show="!showInfo">
<el-option
v-for="item in clanguageList"
......@@ -63,7 +63,7 @@
<el-form-item label="上传图片命名规则" prop="rules">
<span style="color:red;font-size:12px">图片命名格式为DB+时间+拼音,如:DB20180701tupian1;图片尺寸500*375</span>
</el-form-item>
<el-form-item label="描述图片" prop="pic" >
<el-form-item label="描述图片" prop="pic" >
<el-upload
class="avatar-uploader avatar2"
action=""
......@@ -74,8 +74,9 @@
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
<p class="mark">注:推荐新闻(列表中第一条新闻)需上传此图,级别选择"2",尺寸为"260*200"</p>
</el-form-item>
<el-form-item label="MP4文件" prop="video" class="pic">
<el-form-item label="MP4文件" prop="video" class="pic">
<el-upload
class="avatar-uploader avatar2"
action=""
......@@ -86,13 +87,25 @@
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p v-show="showInfo"><video :src="videoUrlStr" class="avatar2"></video></p>
<p class="mark">注:视频为MP4格式,视频编码推荐h.264,音频格式AAC,不超过100M</p>
</el-form-item>
<el-form-item label="" prop="content" >
<el-form-item label="说明" prop="content" >
<Ueditor @ready="editorReady" :value="ueditor.value" :config="ueditor.config" ref="ue" v-show="!showInfo"></Ueditor>
<!-- <el-input v-model="dataForm.content" placeholder="请输入内容"></el-input> -->
<div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item>
<el-form-item label="时间" prop="showtime">
<el-date-picker
v-show="!showInfo"
v-model="dataForm.showtime"
value-format='yyyy-MM-dd'
type="date"
placeholder="选择日期">
</el-date-picker>
<p class="mark"><span style="color:#606266">(时间格式为:xxxx/xx/xx)</span>注:不填写为默认上传日期</p>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo">
<el-button @click="visible = false">取消</el-button>
......@@ -130,7 +143,8 @@ export default {
longStr: '',
stdate: '',
clanguage: '',
wavname: ''
wavname: '',
showtime: ''
},
cclassidStr: undefined,
dataRule: {
......@@ -149,9 +163,9 @@ export default {
// author: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
stdate: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// stdate: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
......@@ -251,7 +265,8 @@ export default {
'clanguage': this.dataForm.clanguage,
'pic': this.dataForm.pic,
'wavname': this.dataForm.wavname,
'content': this.dataForm.content
'content': this.dataForm.content,
'showtime': this.dataForm.showtime
})
}).then(({data}) => {
this.loading = false
......@@ -370,5 +385,8 @@ export default {
}
</script>
<style scoped>
.mark{
color: red;
font-size: 10px;
}
</style>
\ No newline at end of file
......@@ -54,7 +54,7 @@
return {
visible: false,
dataForm: {
branchCode: 0,
id: 0,
branchName: '',
branchAddress: '',
branchPostcode: '',
......@@ -77,13 +77,13 @@
},
methods: {
init (id) {
this.dataForm.branchCode = id || 0
this.dataForm.id = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.branchCode) {
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/office/branch/info/${this.dataForm.branchCode}`),
url: this.$http.adornUrl(`/office/branch/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
......
......@@ -6,7 +6,7 @@
</el-form-item>
<el-form-item>
<el-button @click="getDataList()" type="primary">查询</el-button>
<el-button v-if="isAuth('manage:branch:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<!-- <el-button v-if="isAuth('manage:branch:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button> -->
<!-- <el-button v-if="isAuth('manage:branch:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button> -->
</el-form-item>
</el-form>
......
<template>
<el-dialog
:title="!dataForm.id ? '新增' : this.showInfo ? '详情' : '修改'"
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible"
>
......@@ -16,15 +16,15 @@
<el-input
v-model="dataForm.title"
placeholder="请输入标题"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.title }}</p>
</el-form-item>
<el-form-item label="服务行业:" prop="service">
<el-select
v-model="dataForm.service"
placeholder="请选择服务行业"
v-show="!showInfo"
:disabled='!showInfo'
>
<el-option
v-for="item in serviceList"
......@@ -41,7 +41,6 @@
<el-select
v-model="dataForm.levels"
placeholder="请选择级别"
v-show="!showInfo"
>
<el-option
v-for="item in piclevelList"
......@@ -51,18 +50,18 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.levels }}</p>
</el-form-item>
<el-form-item label="显示时间:" prop="showtime">
<el-date-picker
v-show="!showInfo"
:disabled='!showInfo'
v-model="dataForm.showtime"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
>
</el-date-picker>
<p v-show="showInfo">{{ dataForm.showtime }}</p>
</el-form-item>
<!-- <el-form-item label="图片:" prop="pic">
<el-upload
......@@ -84,10 +83,10 @@
:value="ueditor.value"
:config="ueditor.config"
ref="ue"
v-show="!showInfo"
:disabled='!showInfo'
></Ueditor>
<!-- <el-input v-model="dataForm.content" placeholder="请输入内容"></el-input> -->
<div v-show="showInfo" v-html="dataForm.brief"></div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo">
......@@ -308,6 +307,11 @@ export default {
// 更新父子组件内容
editorReady (instance) {
instance.setContent(this.dataForm.brief)
if (!this.showInfo) {
instance.setDisabled()
} else {
instance.setEnabled()
}
instance.addListener('contentChange', () => {
this.dataForm.brief = instance.getContent()
})
......
......@@ -87,7 +87,7 @@
<el-button
v-if="isAuth('standard:cases:save')"
type="primary"
@click="addOrUpdateHandle()"
@click="addOrUpdateHandle('',true)"
>
+ 添加案例</el-button
>
......@@ -216,7 +216,7 @@
v-if="isAuth('standard:cases:update')"
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id)"
@click="addOrUpdateHandle(scope.row.id,false)"
>修改</el-button
>
<el-button
......@@ -242,6 +242,7 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
:key="item"
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
......@@ -252,20 +253,21 @@
<script>
import { piclevelList } from '@/utils'
import AddOrUpdate from "./cases-add-or-update";
import AddOrUpdate from './cases-add-or-update'
export default {
components: {
AddOrUpdate,
AddOrUpdate
},
data() {
data () {
return {
item: +new Date(),
addOrUpdateVisible: false,
dataForm: {
title: "",
editor: "",
status: "",
service: "",
levels: null,
title: '',
editor: '',
status: '',
service: '',
levels: null
},
dataList: [],
pageIndex: 1,
......@@ -275,80 +277,80 @@ export default {
dataListSelections: [],
statusList: [
{
value: "0",
label: "待审核",
value: '0',
label: '待审核'
},
{
value: "-1",
label: "失败",
value: '-1',
label: '失败'
},
{
value: "1",
label: "成功",
},
value: '1',
label: '成功'
}
],
serviceList: [
{
value: "1",
label: "零售",
value: '1',
label: '零售'
},
{
value: "2",
label: "电子商务",
value: '2',
label: '电子商务'
},
{
value: "3",
label: "食品烟酒",
value: '3',
label: '食品烟酒'
},
{
value: "4",
label: "医疗",
value: '4',
label: '医疗'
},
{
value: "5",
label: "物流",
value: '5',
label: '物流'
},
{
value: "6",
label: "服装",
value: '6',
label: '服装'
},
{
value: "7",
label: "快速消费品",
value: '7',
label: '快速消费品'
},
{
value: "8",
label: "消费电子产品",
value: '8',
label: '消费电子产品'
},
{
value: "9",
label: "制造和零部件",
value: '9',
label: '制造和零部件'
},
{
value: "10",
label: "建材",
value: '10',
label: '建材'
},
{
value: "11",
label: "其他",
},
value: '11',
label: '其他'
}
],
piclevelList,
updateDate: [],
releaseDate: [],
};
releaseDate: []
}
},
activated() {
this.getDataList();
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true;
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl("/office/cases/list"),
method: "post",
url: this.$http.adornUrl('/office/cases/list'),
method: 'post',
data: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize,
......@@ -358,135 +360,136 @@ export default {
service: this.dataForm.service,
levels: this.dataForm.levels,
releaseTimeStart:
this.releaseDate === null ? "" : this.releaseDate[0],
releaseTimeEnd: this.releaseDate === null ? "" : this.releaseDate[1],
updateTimeStart: this.updateDate === null ? "" : this.updateDate[0],
updateTimeEnd: this.updateDate === null ? "" : this.updateDate[1],
auditor: this.dataForm.auditor,
}),
this.releaseDate === null ? '' : this.releaseDate[0],
releaseTimeEnd: this.releaseDate === null ? '' : this.releaseDate[1],
updateTimeStart: this.updateDate === null ? '' : this.updateDate[0],
updateTimeEnd: this.updateDate === null ? '' : this.updateDate[1],
auditor: this.dataForm.auditor
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.page.list;
this.totalPage = data.page.totalCount;
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = [];
this.totalPage = 0;
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false;
});
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val;
this.pageIndex = 1;
this.getDataList();
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val;
this.getDataList();
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val;
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 预览
previewHandle (info) {
console.log(info, '预览');
let url;
console.log(info, '预览')
let url
if (!info.directpath || info.directpath === null) {
url = `${this.$store.state.config.urls}/Service/Partners/caseMsg?id=${info.id}`;
url = `${this.$store.state.config.urls}/Service/Partners/caseMsg?id=${info.id}`
} else if (/^\//.test(info.directpath)) {
url = `${this.$store.state.config.urls}${info.directpath}`;
url = `${this.$store.state.config.urls}${info.directpath}`
} else {
url = info.directpath;
url = info.directpath
}
window.open(url, '_blank');
window.open(url, '_blank')
},
// 新增 / 修改
addOrUpdateHandle(id, showInfo) {
this.addOrUpdateVisible = true;
addOrUpdateHandle (id, showInfo) {
this.item = +new Date()
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, showInfo);
});
this.$refs.addOrUpdate.init(id, showInfo)
})
},
// 删除
deleteHandle(id) {
deleteHandle (id) {
var ids = id
? [id]
: this.dataListSelections.map((item) => {
return item.id;
});
return item.id
})
this.$confirm(
`确定对[id=${ids.join(",")}]进行[${id ? "删除" : "批量删除"}]操作?`,
"提示",
`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`,
'提示',
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.then(() => {
this.$http({
url: this.$http.adornUrl("/office/cases/delete"),
method: "post",
data: this.$http.adornData(ids, false),
url: this.$http.adornUrl('/office/cases/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
},
});
this.getDataList()
}
})
} else {
this.$message.error(data.msg);
this.$message.error(data.msg)
}
});
})
.catch(() => {});
})
.catch(() => {})
},
// 审核
checkHandle(id, status) {
let str = "";
checkHandle (id, status) {
let str = ''
if (status === 1) {
str = "成功";
str = '成功'
} else {
str = "失败";
str = '失败'
}
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$http({
url: this.$http.adornUrl("/office/cases/verify"),
method: "post",
url: this.$http.adornUrl('/office/cases/verify'),
method: 'post',
data: this.$http.adornData({
id: id,
status: status,
}),
status: status
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
},
});
this.getDataList()
}
})
} else {
this.$message.error(data.msg);
this.$message.error(data.msg)
}
});
})
.catch(() => {});
},
},
};
})
.catch(() => {})
}
}
}
</script>
<template>
<el-dialog
:title="!dataForm.id ? '新增' : this.showInfo ? '详情' : '修改'"
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible"
>
......@@ -16,15 +16,16 @@
<el-input
v-model="dataForm.firmname"
placeholder="请输入企业名称"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.firmname }}</p>
</el-form-item>
<el-form-item label="技术领域:" prop="technology">
<el-select
v-model="dataForm.technology"
placeholder="请选择技术领域"
v-show="!showInfo"
:disabled='!showInfo'
>
<el-option
v-for="item in technologyList"
......@@ -34,13 +35,13 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.technology }}</p>
</el-form-item>
<el-form-item label="服务行业:" prop="service">
<el-select
v-model="dataForm.service"
placeholder="请选择服务行业"
v-show="!showInfo"
:disabled='!showInfo'
>
<el-option
v-for="item in serviceList"
......@@ -50,45 +51,44 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.service }}</p>
</el-form-item>
<el-form-item label="网址:" prop="site">
<el-input
v-model="dataForm.site"
placeholder="请输入网址"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.site }}</p>
</el-form-item>
<el-form-item label="联系人姓名:" prop="name">
<el-input
v-model="dataForm.name"
placeholder="请输入联系人姓名"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.name }}</p>
</el-form-item>
<el-form-item label="联系电话:" prop="phone">
<el-input
v-model="dataForm.phone"
placeholder="请输入联系电话"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.phone }}</p>
</el-form-item>
<el-form-item label="邮箱:" prop="email">
<el-input
v-model="dataForm.email"
placeholder="请输入邮箱"
v-show="!showInfo"
:disabled='!showInfo'
></el-input>
<p v-show="showInfo">{{ dataForm.email }}</p>
</el-form-item>
<el-form-item label="级别:" prop="levels">
<el-select
v-model="dataForm.levels"
placeholder="请选择级别"
v-show="!showInfo"
>
<el-option
v-for="item in piclevelList"
......@@ -98,17 +98,17 @@
>
</el-option>
</el-select>
<p v-show="showInfo">{{ dataForm.levels }}</p>
</el-form-item>
<el-form-item label="上传图片:" prop="pic">
<el-upload
v-show="!showInfo"
class="avatar-uploader avatar2"
action=""
:show-file-list="false"
:http-request="Upload"
:before-upload="beforeAvatarUpload"
:disabled='!showInfo'
>
<img v-if="dialogVisible" :src="imgUrlStr" class="" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
......@@ -122,13 +122,11 @@
:value="ueditor.value"
:config="ueditor.config"
ref="ue"
v-show="!showInfo"
></Ueditor>
<!-- <el-input v-model="dataForm.content" placeholder="请输入内容"></el-input> -->
<div v-show="showInfo" v-html="dataForm.brief"></div>
<!-- <div v-show="!showInfo" v-html="dataForm.brief"></div> -->
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo">
<span slot="footer" class="dialog-footer" >
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
......@@ -255,6 +253,8 @@ export default {
piclevelList
}
},
created () {
},
methods: {
getSelectName (list, id) {
let arr = list.filter((item) => {
......@@ -383,9 +383,22 @@ export default {
this.dialogVisible = false
this.ueditor.value = ''
},
clearInp2 () {
this.$router.go(0)
this.imgUrlStr = ''
this.dialogVisible = false
this.visible = false
this.ueditor.value = ''
},
// 更新父子组件内容
editorReady (instance) {
instance.setContent(this.dataForm.brief)
if (!this.showInfo) {
instance.setDisabled()
} else {
instance.setEnabled()
}
instance.addListener('contentChange', () => {
this.dataForm.brief = instance.getContent()
})
......
......@@ -103,7 +103,7 @@
<el-button
v-if="isAuth('standard:partners:save')"
type="primary"
@click="addOrUpdateHandle()"
@click="addOrUpdateHandle('',true)"
>
+ 添加服务商</el-button
>
......@@ -239,7 +239,7 @@
v-if="isAuth('standard:partners:update')"
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id)"
@click="addOrUpdateHandle(scope.row.id,false)"
>修改</el-button
>
<el-button
......@@ -265,6 +265,7 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
:key="item"
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
......@@ -275,21 +276,22 @@
<script>
import { piclevelList } from '@/utils'
import AddOrUpdate from "./partners-add-or-update";
import AddOrUpdate from './partners-add-or-update'
export default {
components: {
AddOrUpdate,
AddOrUpdate
},
data() {
data () {
return {
item: +new Date(),
addOrUpdateVisible: false,
dataForm: {
firmname: "",
editor: "",
status: "",
technology: "",
service: "",
levels: null,
firmname: '',
editor: '',
status: '',
technology: '',
service: '',
levels: null
},
dataList: [],
pageIndex: 1,
......@@ -299,102 +301,102 @@ export default {
dataListSelections: [],
statusList: [
{
value: "0",
label: "待审核",
value: '0',
label: '待审核'
},
{
value: "-1",
label: "失败",
value: '-1',
label: '失败'
},
{
value: "1",
label: "成功",
},
value: '1',
label: '成功'
}
],
technologyList: [
{
value: "1",
label: "标识的打印和制作",
value: '1',
label: '标识的打印和制作'
},
{
value: "2",
label: "系统集成",
value: '2',
label: '系统集成'
},
{
value: "3",
label: "信息服务",
value: '3',
label: '信息服务'
},
{
value: "4",
label: "咨询服务",
value: '4',
label: '咨询服务'
},
{
value: "5",
label: "其他",
},
value: '5',
label: '其他'
}
],
serviceList: [
{
value: "1",
label: "零售",
value: '1',
label: '零售'
},
{
value: "2",
label: "电子商务",
value: '2',
label: '电子商务'
},
{
value: "3",
label: "食品烟酒",
value: '3',
label: '食品烟酒'
},
{
value: "4",
label: "医疗",
value: '4',
label: '医疗'
},
{
value: "5",
label: "物流",
value: '5',
label: '物流'
},
{
value: "6",
label: "服装",
value: '6',
label: '服装'
},
{
value: "7",
label: "快速消费品",
value: '7',
label: '快速消费品'
},
{
value: "8",
label: "消费电子产品",
value: '8',
label: '消费电子产品'
},
{
value: "9",
label: "制造和零部件",
value: '9',
label: '制造和零部件'
},
{
value: "10",
label: "建材",
value: '10',
label: '建材'
},
{
value: "11",
label: "其他",
},
value: '11',
label: '其他'
}
],
piclevelList,
updateDate: [],
releaseDate: [],
};
releaseDate: []
}
},
activated() {
this.getDataList();
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true;
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl("/office/partners/list"),
method: "post",
url: this.$http.adornUrl('/office/partners/list'),
method: 'post',
data: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize,
......@@ -405,136 +407,137 @@ export default {
service: this.dataForm.service,
levels: this.dataForm.levels,
releaseTimeStart:
this.releaseDate === null ? "" : this.releaseDate[0],
releaseTimeEnd: this.releaseDate === null ? "" : this.releaseDate[1],
updateTimeStart: this.updateDate === null ? "" : this.updateDate[0],
updateTimeEnd: this.updateDate === null ? "" : this.updateDate[1],
auditor: this.dataForm.auditor,
}),
this.releaseDate === null ? '' : this.releaseDate[0],
releaseTimeEnd: this.releaseDate === null ? '' : this.releaseDate[1],
updateTimeStart: this.updateDate === null ? '' : this.updateDate[0],
updateTimeEnd: this.updateDate === null ? '' : this.updateDate[1],
auditor: this.dataForm.auditor
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.page.list;
this.totalPage = data.page.totalCount;
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = [];
this.totalPage = 0;
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false;
});
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val;
this.pageIndex = 1;
this.getDataList();
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val;
this.getDataList();
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val;
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 预览
previewHandle (info) {
console.log(info, '预览');
let url;
console.log(info, '预览')
let url
if (!info.directpath || info.directpath === null) {
url = `${this.$store.state.config.urls}/Service/Partners/content?id=${info.id}`;
url = `${this.$store.state.config.urls}/Service/Partners/content?id=${info.id}`
} else if (/^\//.test(info.directpath)) {
url = `${this.$store.state.config.urls}${info.directpath}`;
url = `${this.$store.state.config.urls}${info.directpath}`
} else {
url = info.directpath;
url = info.directpath
}
window.open(url, '_blank');
window.open(url, '_blank')
},
// 新增 / 修改
addOrUpdateHandle(id, showInfo) {
this.addOrUpdateVisible = true;
addOrUpdateHandle (id, showInfo) {
this.item = +new Date()
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, showInfo);
});
this.$refs.addOrUpdate.init(id, showInfo)
})
},
// 删除
deleteHandle(id) {
deleteHandle (id) {
var ids = id
? [id]
: this.dataListSelections.map((item) => {
return item.id;
});
return item.id
})
this.$confirm(
`确定对[id=${ids.join(",")}]进行[${id ? "删除" : "批量删除"}]操作?`,
"提示",
`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`,
'提示',
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.then(() => {
this.$http({
url: this.$http.adornUrl("/office/partners/delete"),
method: "post",
data: this.$http.adornData(ids, false),
url: this.$http.adornUrl('/office/partners/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
},
});
this.getDataList()
}
})
} else {
this.$message.error(data.msg);
this.$message.error(data.msg)
}
});
})
.catch(() => {});
})
.catch(() => {})
},
// 审核
checkHandle(id, status) {
let str = "";
checkHandle (id, status) {
let str = ''
if (status === 1) {
str = "成功";
str = '成功'
} else {
str = "失败";
str = '失败'
}
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm(`确定对[id=${id}]进行['审核${str}']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$http({
url: this.$http.adornUrl("/office/partners/verifyPartners"),
method: "post",
url: this.$http.adornUrl('/office/partners/verifyPartners'),
method: 'post',
data: this.$http.adornData({
id: id,
status: status,
}),
status: status
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
},
});
this.getDataList()
}
})
} else {
this.$message.error(data.msg);
this.$message.error(data.msg)
}
});
})
.catch(() => {});
},
},
};
})
.catch(() => {})
}
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment