|
@@ -30,11 +30,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-form-item>
|
|
|
- <el-select
|
|
|
- placeholder="审核状态"
|
|
|
- v-model="searchForm.examineFlag"
|
|
|
- clearable
|
|
|
- >
|
|
|
+ <el-select placeholder="审核状态" v-model="searchForm.examineFlag" clearable>
|
|
|
<el-option label="未审核" :value="0"></el-option>
|
|
|
<el-option label="审核通过" :value="1"></el-option>
|
|
|
<el-option label="驳回" :value="2"></el-option>
|
|
@@ -49,35 +45,10 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- round
|
|
|
- plain
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="create(null)"
|
|
|
- v-if="show"
|
|
|
- >新建</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- v-if="show"
|
|
|
- @click="batchPutaway"
|
|
|
- >批量开启</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- v-if="show"
|
|
|
- @click="batchUnshelve"
|
|
|
- >批量关闭</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- v-if="show"
|
|
|
- @click="deleteData(ids, 'batch')"
|
|
|
- >批量删除</el-button>
|
|
|
+ <el-button type="primary" round plain icon="el-icon-plus" @click="create(null)" v-if="show">新建</el-button>
|
|
|
+ <el-button type="primary" plain round v-if="show" @click="batchPutaway">批量开启</el-button>
|
|
|
+ <el-button type="primary" plain round v-if="show" @click="batchUnshelve">批量关闭</el-button>
|
|
|
+ <el-button type="primary" plain round v-if="show" @click="deleteData(ids, 'batch')">批量删除</el-button>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -88,16 +59,7 @@
|
|
|
<span class="subject-color">{{ ids.length }}</span> 项
|
|
|
</div>
|
|
|
<div class="MaintenanceTable">
|
|
|
- <el-table
|
|
|
- ref="multipleTable"
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%"
|
|
|
- tooltip-effect="dark"
|
|
|
- @selection-change="selectionChange"
|
|
|
- class="OutTable"
|
|
|
- border
|
|
|
- v-loading="listLoading"
|
|
|
- >
|
|
|
+ <el-table ref="multipleTable" :data="tableData" style="width: 100%" tooltip-effect="dark" @selection-change="selectionChange" class="OutTable" border v-loading="listLoading">
|
|
|
<el-table-column type="selection"></el-table-column>
|
|
|
<el-table-column prop="title" label="标题" :show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column prop="userName" label="专家" :show-overflow-tooltip="true"></el-table-column>
|
|
@@ -106,10 +68,7 @@
|
|
|
<el-table-column prop="imgs" label="图片">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.imgs && scope.row.imgs.length > 0" @click="imgOpen(scope.row.imgs[0])">
|
|
|
- <el-image
|
|
|
- :src="scope.row.imgs[0] | pathPipe"
|
|
|
- style="width:64px;height:64px;cursor:pointer"
|
|
|
- ></el-image>
|
|
|
+ <el-image :src="scope.row.imgs[0] | pathPipe" style="width:64px;height:64px;cursor:pointer"></el-image>
|
|
|
</span>
|
|
|
<span v-else>-无-</span>
|
|
|
</template>
|
|
@@ -129,57 +88,23 @@
|
|
|
<template slot-scope="scope">
|
|
|
<span class="warn" v-show="scope.row.examineFlag == 0">未审核</span>
|
|
|
<span class="success" v-show="scope.row.examineFlag == 1">审核通过</span>
|
|
|
- <RejectReason
|
|
|
- :content="scope.row.notExamineReason"
|
|
|
- v-show="scope.row.examineFlag == 2"
|
|
|
- ></RejectReason>
|
|
|
+ <RejectReason :content="scope.row.notExamineReason" v-show="scope.row.examineFlag == 2"></RejectReason>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="hotFlag" label="置顶" min-width="110px;" v-if="show">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch
|
|
|
- v-model="scope.row.hotFlag"
|
|
|
- active-text="开"
|
|
|
- inactive-text="关"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
- :disabled="scope.row.examineFlag !==1"
|
|
|
- @change="switchShow(scope.row.hotFlag, scope.row.id)"
|
|
|
- ></el-switch>
|
|
|
+ <el-switch v-model="scope.row.hotFlag" active-text="开" inactive-text="关" :active-value="1" :inactive-value="0" :disabled="scope.row.examineFlag !==1" @change="switchShow(scope.row.hotFlag, scope.row.id)"></el-switch>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="statuz" label="启用状态" min-width="110px;" v-if="show">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch
|
|
|
- v-model="scope.row.statuz"
|
|
|
- active-text="开"
|
|
|
- inactive-text="关"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
- :disabled="scope.row.examineFlag !==1"
|
|
|
- @change="switchChange(scope.row.statuz, scope.row.id)"
|
|
|
- ></el-switch>
|
|
|
+ <el-switch v-model="scope.row.statuz" active-text="开" inactive-text="关" :active-value="1" :inactive-value="0" :disabled="scope.row.examineFlag !==1" @change="switchChange(scope.row.statuz, scope.row.id)"></el-switch>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" min-width="300px;">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- @click="deleteData(scope.row.id)"
|
|
|
- v-if="show"
|
|
|
- >删除</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- :disabled="scope.row.examineFlag === 1"
|
|
|
- @click="edit(scope.row)"
|
|
|
- v-if="show"
|
|
|
- >编辑</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round @click="deleteData(scope.row.id)" v-if="show">删除</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round :disabled="scope.row.examineFlag === 1" @click="edit(scope.row)" v-if="show">编辑</el-button>
|
|
|
<!-- <el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
@@ -189,39 +114,14 @@
|
|
|
v-if="show"
|
|
|
@click="toTop(scope.row.id, scope.row.hotFlag)"
|
|
|
>{{ scope.row.hotFlag === 1 ? '取消置顶' : '置顶' }}</el-button>-->
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- @click="showDetailsDialog(scope.row)"
|
|
|
- >详情</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- size="mini"
|
|
|
- v-if="!show"
|
|
|
- @click="pass(scope.row.id)"
|
|
|
- >通过</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- round
|
|
|
- size="mini"
|
|
|
- v-if="!show"
|
|
|
- @click="rejectShow(scope.row.id)"
|
|
|
- >驳回</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain round @click="showDetailsDialog(scope.row)">详情</el-button>
|
|
|
+ <el-button type="primary" plain round size="mini" v-if="!show" @click="pass(scope.row.id)">通过</el-button>
|
|
|
+ <el-button type="primary" plain round size="mini" v-if="!show" @click="rejectShow(scope.row.id)">驳回</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagenation">
|
|
|
- <PageComponent
|
|
|
- :total="total"
|
|
|
- @pagination="handlePagination"
|
|
|
- :pageSize.sync="page.pageSize"
|
|
|
- :pageNum.sync="page.pageNum"
|
|
|
- ></PageComponent>
|
|
|
+ <PageComponent :total="total" @pagination="handlePagination" :pageSize.sync="page.pageSize" :pageNum.sync="page.pageNum"></PageComponent>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -292,7 +192,7 @@ export default {
|
|
|
*/
|
|
|
selectionChange(data) {
|
|
|
this.selection = data;
|
|
|
- this.ids = data.map(item => {
|
|
|
+ this.ids = data.map((item) => {
|
|
|
return item.id;
|
|
|
});
|
|
|
},
|
|
@@ -316,12 +216,12 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
queryPage(obj)
|
|
|
- .then(res => {
|
|
|
- if(res.statusCode == "10"){
|
|
|
- this.$router.replace("/login");
|
|
|
+ .then((res) => {
|
|
|
+ if (res.statusCode == '10') {
|
|
|
+ this.$router.replace('/login');
|
|
|
}
|
|
|
this.tableData = res.data.records;
|
|
|
- this.tableData.forEach(item => {
|
|
|
+ this.tableData.forEach((item) => {
|
|
|
if (item.imgs) {
|
|
|
item.imgs = item.imgs.split(',');
|
|
|
}
|
|
@@ -349,13 +249,13 @@ export default {
|
|
|
if (this.ids.length === 0) return this.$message.warning('请至少选中一项 !');
|
|
|
// console.log(this.ids, "ids");
|
|
|
obj = {
|
|
|
- ids: this.ids
|
|
|
- }
|
|
|
+ ids: this.ids,
|
|
|
+ };
|
|
|
this.delete(obj);
|
|
|
} else {
|
|
|
obj = {
|
|
|
- ids: [id]
|
|
|
- }
|
|
|
+ ids: [id],
|
|
|
+ };
|
|
|
this.delete(obj);
|
|
|
}
|
|
|
},
|
|
@@ -399,7 +299,7 @@ export default {
|
|
|
this.$message.success('修改成功');
|
|
|
this.queryListData();
|
|
|
})
|
|
|
- .catch(err => err);
|
|
|
+ .catch((err) => err);
|
|
|
},
|
|
|
// 置顶
|
|
|
// toTop(id, type) {
|
|
@@ -423,17 +323,17 @@ export default {
|
|
|
// },
|
|
|
// 批量开启
|
|
|
batchPutaway() {
|
|
|
- const ids = this.selection.filter(item => {
|
|
|
+ const ids = this.selection.filter((item) => {
|
|
|
return item.examineFlag === 1;
|
|
|
});
|
|
|
- const arr = ids.map(item => {
|
|
|
+ const arr = ids.map((item) => {
|
|
|
return item.id;
|
|
|
});
|
|
|
if (arr.length === 0) {
|
|
|
this.$message.warning('请至少选中一项审核通过的!');
|
|
|
return false;
|
|
|
}
|
|
|
- useBath({ids: arr})
|
|
|
+ useBath({ ids: arr })
|
|
|
.then(() => {
|
|
|
this.$message.success('操作成功');
|
|
|
this.queryListData();
|
|
@@ -442,22 +342,22 @@ export default {
|
|
|
},
|
|
|
// 批量关闭
|
|
|
batchUnshelve() {
|
|
|
- const ids = this.selection.filter(item => {
|
|
|
+ const ids = this.selection.filter((item) => {
|
|
|
return item.examineFlag === 1;
|
|
|
});
|
|
|
- const arr = ids.map(item => {
|
|
|
+ const arr = ids.map((item) => {
|
|
|
return item.id;
|
|
|
});
|
|
|
if (arr.length === 0) {
|
|
|
this.$message.warning('请至少选中一项审核通过的!');
|
|
|
return false;
|
|
|
}
|
|
|
- noUseBath({ids: arr})
|
|
|
+ noUseBath({ ids: arr })
|
|
|
.then(() => {
|
|
|
this.$message.success('操作成功');
|
|
|
this.queryListData();
|
|
|
})
|
|
|
- .catch(err => err);
|
|
|
+ .catch((err) => err);
|
|
|
},
|
|
|
// 查询
|
|
|
query() {
|
|
@@ -513,7 +413,7 @@ export default {
|
|
|
},
|
|
|
// 审批
|
|
|
approval(data) {
|
|
|
- examine(data).then(res => {
|
|
|
+ examine(data).then((res) => {
|
|
|
if (res.statusCode === '1') {
|
|
|
this.$message.success('操作成功');
|
|
|
} else {
|
|
@@ -529,9 +429,9 @@ export default {
|
|
|
this.searchForm.brandId = null;
|
|
|
}
|
|
|
},
|
|
|
- imgOpen(imgs){
|
|
|
+ imgOpen(imgs) {
|
|
|
window.open(imgs);
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|