提交 e807e5ce authored 作者: 龙菲's avatar 龙菲

完善审批管理

上级 ba3882c5
......@@ -77,7 +77,7 @@ export function getDisplayCheckById(params) {
})
}
// 查询审批结果
// 审批
export function postCheck(data) {
return request({
url: '/bizCheck/check',
......
......@@ -3,11 +3,11 @@
<span v-for="(op, index) in operations" :key="index">
<span v-if="op.type == 'delete'">
<el-popconfirm :title="deleteTitle ? deleteTitle : '确定删除吗?'" @onConfirm="clickOperation(op)">
<el-button type="danger" size="mini" slot="reference" :icon="icons[op.type]" style="margin-right: 4px">
<el-button type="danger" :disabled="disabled" size="mini" slot="reference" :icon="icons[op.type]" style="margin-right: 4px">
{{ op.title }}</el-button>
</el-popconfirm>
</span>
<el-button size="mini" :icon="icons[op.type]" @click="clickOperation(op)" type="primary" style="margin-right: 4px"
<el-button size="mini" :icon="icons[op.type]" :disabled="(disabled &&op.type!='view')" @click="clickOperation(op)" type="primary" style="margin-right: 4px"
v-else>{{ op.title }}
</el-button>
</span>
......@@ -27,6 +27,10 @@ export default {
deleteTitle: {
type: String,
},
disabled:{
type: Boolean,
default:false
}
},
data() {
return {
......
......@@ -3,11 +3,11 @@
<div class="images-list">
<el-upload :disabled="onlyRead" action="#" :on-remove="handleRemove" :on-exceed="handleExceed" :on-change="handleChange"
:file-list="fileList" :multiple="fileLimit > 1" :limit="fileLimit" :list-type="listType" :accept="fileAccept"
:auto-upload="false" ref="ManualUploader" :class="{ disabled: uploadDisabled }">
<i v-if="listType === 'picture-card'" class="el-icon-plus" slot="trigger"></i>
<el-button v-else size="small" type="primary" >点击上传</el-button>
:auto-upload="false" ref="ManualUploader" :class="{ disabled: uploadDisabled || onlyRead }">
<i v-if="listType === 'picture-card'" class="el-icon-plus" slot="trigger" ></i>
<el-button size="small" type="primary" v-else-if="!onlyRead">点击上传</el-button>
<div v-if="showTip" slot="tip" class="el-upload__tip">
<div v-if="(showTip && !onlyRead)" slot="tip" class="el-upload__tip">
<div v-if="advice" style="color: #f56c6c">建议:{{ advice }}</div>
提示:只能上传{{ fileTypeName || "jpg/png" }}文件,且不超过
{{ fileSize }}MB,最多上传{{ fileLimit }}个文件
......@@ -210,7 +210,7 @@ export default {
};
</script>
<style lang="scss" >
.disabled .el-upload--picture-card {
.disabled .el-upload--picture-card,.el-upload--card {
display: none !important;
}
......
......@@ -13,14 +13,16 @@ import router from './router'
import '@/icons' // icon
import '@/permission' // permission control
import VideoPlayer from 'vue-video-player'
import {
getFullUrl
} from '@/utils/index'
import * as echarts from 'echarts';
Vue.use(VideoPlayer)
Vue.prototype.$getFullUrl = getFullUrl
Vue.prototype.$echarts = echarts
......
......@@ -5,10 +5,12 @@
<div class="label">{{ title }}</div>
</div>
<div class="dialog-content">
<el-tabs v-model="activeName">
<el-tab-pane label="基本信息" name="info">
<BaseInfo :displayDetail="displayDetail" :dicts="dicts" />
</el-tab-pane>
<el-tabs v-model="activeName" v-loading="dialogLoading">
<!-- <el-tab-pane label="基本信息" name="info">
<div class="container">
<BaseInfo :displayDetail="displayDetail" :dicts="dicts" />
</div>
</el-tab-pane> -->
<el-tab-pane label="效果预览" name="page">
<div class="container" v-if="dicts">
<NormalStyle v-if="displayDetail.themeType == '1'" :displayDetail="displayDetail" :dicts="dicts" />
......@@ -18,36 +20,41 @@
</el-tab-pane>
<el-tab-pane label="审批历史记录" name="history">
<div class="container">
<el-steps :active="displayDetail.historyChecks.length" align-center>
<el-steps :active="displayDetail.historyChecks.length">
<el-step v-for="(item, index) in displayDetail.historyChecks" :title="getStepTitle(item)" :key="index"
:icon="getStepIcon(item)">
<div slot="description">
<div class="name">{{ item.createName }}</div>
<div class="time">{{ item.createTime }}</div>
<div class="desc">{{ item.remark }}</div>
</div>
</div>
</el-step>
</el-steps>
</div>
</el-tab-pane>
</el-tabs>
<div class="dialog-footer">
<el-button @click="handleClose" style="margin-right:6px">取消</el-button>
<el-popover placement="top-end" width="400" trigger="click">
<div>
<el-form :model="dialogForm">
<el-form-item label="驳回意见" prop="remark">
<el-input placeholder="驳回意见" v-model="dialogForm.remark" size="small">
<el-button type="primary" slot="append" @click.native="handleCheck(-2)">确定</el-button>
</el-input>
</el-form-item>
</el-form>
<span v-if="(displayDetail.checkStatus == 0)">
<el-button @click.native="handleClose" style="margin-right:6px">取消</el-button>
<el-popover placement="top-end" width="400" trigger="click">
<div>
<el-form :model="dialogForm">
<el-form-item label="驳回意见" prop="remark">
<el-input placeholder="驳回意见" v-model="dialogForm.remark" size="small">
<el-button type="primary" slot="append" @click.native="handleCheck(-2)">确定</el-button>
</el-input>
</el-form-item>
</el-form>
</div>
<el-button slot="reference" type="danger" icon="el-icon-close">驳回</el-button>
</el-popover>
<el-button style="margin-left:6px" type="primary" icon="el-icon-check"
@click.native="handleCheck(1)">同意</el-button>
</span>
<span v-else>
<el-button type="primary" @click.native="handleClose">关闭</el-button>
</span>
</div>
<el-button slot="reference" type="danger" icon="el-icon-close">驳回</el-button>
</el-popover>
<el-button style="margin-left:6px" type="primary" icon="el-icon-check"
@click.native="handleCheck(1)">同意</el-button>
</div>
</div>
......@@ -80,6 +87,10 @@ export default {
type: Object,
default: () => ({}),
},
loading: {
type: Boolean,
default: false,
}
},
computed: {
......@@ -103,7 +114,7 @@ export default {
return (item) => {
switch (item.checkStatus) {
case 0:
return 'el-icon-s-check'
return 'el-icon-s-promotion'
case 1:
return 'el-icon-s-claim'
case -2:
......@@ -122,6 +133,9 @@ export default {
immediate: true,
deep: true,
},
loading(value) {
this.dialogLoading = value
}
},
data() {
return {
......@@ -129,7 +143,9 @@ export default {
dialogForm: {
remark: '',//驳回意见
},
activeName: 'info'
activeName: 'page',
historyChecks: [],
dialogLoading: false
};
},
async mounted() {
......@@ -137,17 +153,27 @@ export default {
"displayType",
"displayCharacter",
]);
console.log('this.dicts',this.dicts);
},
methods: {
handleClose(done) {
this.$emit("handleClose");
},
handleCheck(checkStatus) {
console.log('checkStatus', checkStatus);
// postCheck()
async handleCheck(checkStatus) {
this.dialogLoading = true
const params = {
sourceId: this.displayDetail.exhibitionId,
checkStatus,
remark: this.dialogForm.remark,
sourceType: 'biz_exhibition',
sourceName: this.displayDetail.title
}
let res = await postCheck(params)
if (res.code == 0) {
this.$message.success('操作成功!')
this.dialogLoading = false
this.handleClose()
}
}
},
};
......@@ -172,12 +198,11 @@ export default {
.dialog-content {
padding: 0 32px;
.container {
border: 1px dashed #409eff;
height: calc(64vh);
overflow: auto;
padding: 16px 0;
padding: 46px;
.desc {
color: #666 !important;
......
......@@ -50,7 +50,7 @@
</el-tabs>
<PreviewDisplayDialog v-if="Object.keys(curPreviewObj).length > 0" :visible="previewDialogVisible"
:displayDetail="curPreviewObj" @handleClose="handleClosePreviewDialog" />
:displayDetail="curPreviewObj" @handleClose="handleClosePreviewDialog" :loading="previewLoading"/>
<el-image-viewer v-if="imgViewerVisible" :on-close="closeImgViewer" :url-list="imgList" />
</div>
......@@ -67,9 +67,6 @@ import {
} from "@/api/display";
import SearchBar from "@/components/SearchBar";
import { mapGetters } from "vuex";
import { getToken } from "@/utils/auth";
import { importZip } from "@/utils/file";
import { thisTypeAnnotation } from "@babel/types";
export default {
components: {
TablePage,
......@@ -127,7 +124,8 @@ export default {
}
],
activeName: '0',
currentTabIndex: 0
currentTabIndex: 0,
dialogLoading:false
};
},
computed: {
......@@ -200,10 +198,12 @@ export default {
console.log(value, row);
// debugger
if (value.type == 'approval' || value.type == 'view') {
this.previewLoading = true
if (row) {
this.previewDialogVisible = true;
let res = await getDisplayCheckById({ exhibitionId: row.exhibitionId });
this.curPreviewObj = res.data;
this.previewLoading = false;
}
}
......
......@@ -7,43 +7,27 @@
<div class="exhibition-units-tree-node" slot-scope="{ node, data }">
<div style="display: flex; align-items: center">
<div class="title" @click="handleClickNode(node, data)">
<el-input
placeholder="请输入标题"
v-model="data.title"
v-if="data.isEditing"
:ref="data.euId + 'Title'"
@blur="() => handleInputBlur(node, data)"
>
<el-input placeholder="请输入标题" v-model="data.title" v-if="data.isEditing" :ref="data.euId + 'Title'"
@blur="() => handleInputBlur(node, data)">
</el-input>
<span v-else>{{ data.title }}</span>
</div>
<el-tooltip content="编辑标题" placement="top">
<i
v-if="!data.isEditing"
class="el-icon-edit plus-peer"
@click="() => editNode(node, data)"
></i>
</el-tooltip>
<el-tooltip content="添加子节点" placement="top">
<svg-icon
@click="() => appendChild(data)"
icon-class="node-child2"
class="plus-child"
style="font-size: 32px; color: #409eff"
></svg-icon>
</el-tooltip>
<el-tooltip content="添加同级节点" placement="top">
<i
class="el-icon-plus plus-peer"
@click="() => appendPeerNode(node, data)"
></i>
</el-tooltip>
<el-tooltip content="删除当前节点" placement="top">
<i
class="el-icon-close delete"
@click="() => remove(node, data)"
></i>
</el-tooltip>
<span v-if="!isDisableEvent">
<el-tooltip content="编辑标题" placement="top">
<i v-if="!data.isEditing" class="el-icon-edit plus-peer" @click="() => editNode(node, data)"></i>
</el-tooltip>
<el-tooltip content="添加子节点" placement="top">
<svg-icon @click="() => appendChild(data)" icon-class="node-child2" class="plus-child"
style="font-size: 32px; color: #409eff"></svg-icon>
</el-tooltip>
<el-tooltip content="添加同级节点" placement="top">
<i class="el-icon-plus plus-peer" @click="() => appendPeerNode(node, data)"></i>
</el-tooltip>
<el-tooltip content="删除当前节点" placement="top">
<i class="el-icon-close delete" @click="() => remove(node, data)"></i>
</el-tooltip>
</span>
</div>
</div>
</el-tree>
......@@ -55,44 +39,23 @@
</el-input>
</el-col>
<el-col :span="24" class="mg-bt20">
<VueQuillEditor
v-model="currentData.intro"
placeholder="请输入单元介绍"
/>
<VueQuillEditor v-model="currentData.intro" placeholder="请输入单元介绍" />
</el-col>
<el-col :span="24" class="mg-bt20">
<div>单元文物:</div>
<el-select
v-model="currentData.crIds"
multiple
filterable
remote
reserve-keyword
placeholder="请输入关键词搜索文物"
:remote-method="searchCR"
:loading="loading"
style="width: 100%"
ref="remoteSelect"
>
<el-option
v-for="item in crList"
:key="item.crId"
:label="item.name"
:value="item.crId"
>
<el-select :disabled="isDisableEvent" v-model="currentData.crIds" multiple filterable remote reserve-keyword
:placeholder="isDisableEvent ? '无' : '请输入关键词搜索文物'" :remote-method="searchCR" :loading="loading"
style="width: 100%" ref="remoteSelect">
<el-option v-for="item in crList" :key="item.crId" :label="item.name" :value="item.crId">
</el-option>
</el-select>
</el-col>
<el-col :span="24">
<div>单元图片:</div>
<ManualUploaderBind
v-model="currentData.imagesVo"
:fileLimit="7"
:fileSize="50"
:fileType="['jpeg', 'jpg', 'png']"
listType="picture-card"
:ref="'unit-images-' + currentData.euId"
/>
<span></span>
<ManualUploaderBind v-model="currentData.imagesVo" :fileLimit="7" :fileSize="50"
:fileType="['jpeg', 'jpg', 'png']" listType="picture-card" :ref="'unit-images-' + currentData.euId"
:onlyRead="isDisableEvent" />
</el-col>
</el-row>
<!-- <el-collapse-transition>
......@@ -101,31 +64,14 @@
</el-row>
</el-collapse-transition> -->
<div class="next-prev">
<el-button
size="mini"
type="primary"
icon="el-icon-back"
@click="handleToUnit('prev')"
>上一节点</el-button
>
<el-button
size="mini"
type="primary"
icon="el-icon-right"
@click="handleToUnit('next')"
>下一节点</el-button
>
<el-button size="mini" type="primary" icon="el-icon-back" @click="handleToUnit('prev')">上一节点</el-button>
<el-button size="mini" type="primary" icon="el-icon-right" @click="handleToUnit('next')">下一节点</el-button>
</div>
</el-col>
</el-row>
<el-button
v-if="!treeData.length > 0"
type="primary"
icon="el-icon-circle-plus-outline"
@click="handleAddUnit('manual')"
size="small"
>手动添加展览单元</el-button
>
<el-button v-if="(!treeData.length > 0 && !isDisableEvent)" type="primary" icon="el-icon-circle-plus-outline"
@click="handleAddUnit('manual')" size="small">手动添加展览单元</el-button>
<span v-if="(treeData.length == 0 && isDisableEvent)">暂无</span>
<!-- <el-button
v-if="!treeData.length > 0"
type="success"
......@@ -163,6 +109,10 @@ export default {
type: Array,
default: () => [],
},
isDisableEvent: {
type: Boolean,
default: false
}
},
watch: {
exhibitionUnits: {
......@@ -231,7 +181,7 @@ export default {
this.loading = false;
const res = await getCulturalRelicListPer(params);
if (res.code == 0) {
this.crList = [...new Set([...this.crList, ...res.data.records])];
this.crList = [...new Set([...this.crList, ...res.data.records])];
} else {
this.crList = [];
this.$message.error(res.msg);
......@@ -379,6 +329,7 @@ export default {
display: flex;
width: 100%;
flex-direction: column;
.title {
width: 200px;
overflow: hidden;
......@@ -386,6 +337,7 @@ export default {
text-overflow: ellipsis;
}
}
::v-deep .el-tree-node__content {
// padding: 10px;
// min-height: 140px;
......@@ -398,6 +350,7 @@ export default {
.tree-container {
border: 1px #ccc dashed;
}
.node-detail {
background: #f4f9ff;
padding: 16px;
......@@ -411,11 +364,13 @@ export default {
padding: 4px;
border-radius: 4px;
margin-left: 10px;
&:hover {
background-color: rgba($color: #000000, $alpha: 0.05);
//
}
}
.plus-peer {
font-size: 20px !important;
// font-weight: bold;
......@@ -424,11 +379,13 @@ export default {
padding: 4px;
border-radius: 4px;
margin-left: 10px;
&:hover {
background-color: rgba($color: #000000, $alpha: 0.05);
//
}
}
.delete {
font-size: 20px;
// font-weight: bold;
......@@ -437,14 +394,17 @@ export default {
padding: 4px;
border-radius: 4px;
margin-left: 10px;
&:hover {
background-color: rgba($color: #000000, $alpha: 0.05);
//
}
}
.add-image {
display: flex;
align-items: center;
.svg-icon {
width: 24px;
height: 24px;
......@@ -455,14 +415,17 @@ export default {
box-sizing: border-box;
}
}
.mg-bt20 {
margin-bottom: 20px;
}
::v-deep .images-list {
& > div {
&>div {
white-space: pre-wrap;
}
}
.next-prev {
display: flex;
justify-content: flex-end;
......
......@@ -42,19 +42,14 @@
dicts.displayType[displayDetail.type] || "暂无"
}}</span>
</div>
<div class="body-item">
<div class="body-item" v-if="(dicts && dicts.displayCharacter)">
<span class="label">
<!-- <svg-icon icon-class="zlxz"></svg-icon> -->
展览性质:
</span>
<span class="value">{{
dicts.displayCharacter[
displayDetail.displayCharacter
] || "暂无"
}}</span>
<span>
{{ dicts }}
</span>
<span class="value">
{{ dicts.displayCharacter[displayDetail.displayCharacter] || '暂无'
}}</span>
</div>
<div class="body-item">
<span class="label">
......@@ -179,9 +174,14 @@
{{ item.name.split(".")[0] }}
</div>
</div> -->
</div>
<div class="video-container">
<video v-if="currentVideo && currentVideo.url" :src="$getFullUrl(currentVideo.url)"
:controls="true"></video>
</div>
<video-player v-if="currentVideo && currentVideo.url" :src="$getFullUrl(currentVideo.url)" class="video-box">
</video-player>
<!-- <VideoCustomPlayer v-if="currentVideo && currentVideo.url" :src="$getFullUrl(currentVideo.url)" class="video-box" /> -->
</div>
<!--展览单元 -->
......@@ -253,13 +253,13 @@ import { swiper, swiperSlide } from "vue-awesome-swiper";
import "swiper/dist/css/swiper.css";
import { isElementInViewport2 } from "@/utils/index";
import NormalStyleUnit from './NormalStyleUnit.vue'
import videoPlayer from "@/components/VideoPlayer";
import VideoCustomPlayer from "@/components/VideoPlayer";
export default {
name: "NormalStyle",
components: {
AudioPlayer,
ReaderOperations,
videoPlayer,
VideoCustomPlayer,
NormalStyleUnit,
SlideImage,
SlideImageGroup,
......@@ -334,7 +334,6 @@ export default {
},
async mounted() {
this.loadDetail();
console.log('this.dicts',this.dicts.displayCharacter);
this.$nextTick(() => {
window.addEventListener("scroll", this.initHeight);
this.offsetTop = document.querySelector("#tabbar").offsetTop; //距离offsetParent的高度
......@@ -1014,6 +1013,11 @@ $themeColor: #132c33;
}
::v-deep .swiper-wrapper{
height: auto;
}
// .video-item {
// font-size: 18px;
// margin: 8px 30px;
......@@ -1081,6 +1085,15 @@ $themeColor: #132c33;
height: 100%;
}
}
.video-container {
width: 100%;
height: 400px;
video {
width: 100%;
height: 100%;
}
}
}
......
......@@ -69,11 +69,7 @@ export const title = [{
sortable: true
},
{
prop: "remark",
label: "备注",
columnAlign: 'center', showOverFlowToolTip: true,
},
{
prop: "status",
label: "是否上架",
......@@ -89,6 +85,11 @@ export const title = [{
prop: "themeType",
label: "模板主题",
columnAlign: 'center',
},
{
prop: "remark",
label: "备注",
columnAlign: 'center', showOverFlowToolTip: true,
},
// {
// prop: "images",
......@@ -113,7 +114,7 @@ export const title = [{
export const operates = {
operate: true,
label: "操作",
width: "260px",
width: "320px",
minwidth: "220px",
titleAlign: "center",
columnAlign: "center",
......@@ -127,11 +128,14 @@ export const operations = [{
type: 'edit',
title: '编辑'
},
// {
// type: 'approval',
// title: '提交审核'
// },
{
type: 'delete',
title: '删除'
},
]
export const literatureTableTitle = [{
......@@ -168,29 +172,29 @@ export const importRecordsTitle = [{
width: 300
},
{
prop:'username',
label:'操作用户',
prop: 'username',
label: '操作用户',
columnAlign: "center",
},
{
prop:'optType',
label:'操作类型',
prop: 'optType',
label: '操作类型',
columnAlign: "center",
},
// {
// prop: "fileSize",
// label: "文件大小",
// columnAlign: "center",
// },
// {
// prop: "remark",
// label: "备注",
// columnAlign: "center",
// width: "60px",
// },
// {
// prop: "fileSize",
// label: "文件大小",
// columnAlign: "center",
// },
// {
// prop: "remark",
// label: "备注",
// columnAlign: "center",
// width: "60px",
// },
]
export const importOperates = {
......
......@@ -33,7 +33,8 @@
<TablePage :data="list.records" :tableTitle="tableTitle" :operates="tableOperates">
<template v-slot:status="data">
<el-popconfirm :title="getStatusTitle(data.scope.status)" @onConfirm="handleChangeStatus(data.scope)">
<el-switch slot="reference" :value="Boolean(Number(data.scope.status))"></el-switch>
<el-switch slot="reference" :disabled="isDisabledStatusbtn(data.scope.checkStatus)"
:value="Boolean(Number(data.scope.status))"></el-switch>
</el-popconfirm>
</template>
<template v-slot:displayType="data">
......@@ -42,7 +43,7 @@
<template v-slot:checkStatus="data">
<!-- {{ data.scope.checkStatus }} -->
<el-tag type="primary" v-if="data.scope.checkStatus == 0">
待审核
审核中
</el-tag>
<el-tag type="success" v-if="data.scope.checkStatus == 1">
已通过
......@@ -50,6 +51,9 @@
<el-tag type="danger" v-if="data.scope.checkStatus == -2">
已驳回
</el-tag>
<el-tag type="warning" v-if="(data.scope.checkStatus == -1)">
待提交
</el-tag>
</template>
<template v-slot:faceImageUrl="data">
<img :src="
......@@ -62,7 +66,8 @@
{{ themeTypeCode(data.scope.themeType) }}
</template>
<template v-slot:operates="scope">
<TableOperation :operations="tableOperations" :rawData="scope.scope.row" @handleOperation="handleOperation">
<TableOperation :operations="tableOperations" :rawData="scope.scope.row" @handleOperation="handleOperation"
:disabled="isDisabled(scope.scope.row.checkStatus)">
</TableOperation>
</template>
</TablePage>
......@@ -217,6 +222,20 @@ export default {
}
};
},
isDisabled(checkStatus) {
return (checkStatus) => {
return checkStatus == '0'
//在审核中和已通过,则不能使用提交审核、编辑及删除按钮
}
},
isDisabledStatusbtn(checkStatus) {
//待提交、审核中,不能使用上下架
return (checkStatus) => {
return checkStatus == '0' || checkStatus == '-1'
}
}
},
async created() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论