提交 89a6f7ae authored 作者: 龙菲's avatar 龙菲

对接审核管理的查看详情、审核接口;修复角色管理模块缺陷

上级 b24f538e
...@@ -9,15 +9,15 @@ export function getFlowListPagePer(data) { ...@@ -9,15 +9,15 @@ export function getFlowListPagePer(data) {
}) })
} }
// 通过流程id查询流程详情 // 通过流程id查询流程详情
export function getFlowDetailById(params) { export function getFlowDetailById(id) {
return request({ return request({
url: '/bizFlow/detailById', url: '/bizFlow/detailById?id=' + id,
method: 'get', method: 'get',
params
}) })
} }
// 查询流程关联的文物详情(手动添加的文物详情) // 查询流程关联的文物详情(手动添加的文物详情),用于驳回时重提
export function getFlowCulturalRelicDetail(params) { export function getFlowCulturalRelicDetail(params) {
return request({ return request({
url: '/bizFlow/flowCulturalRelicDetail', url: '/bizFlow/flowCulturalRelicDetail',
...@@ -27,7 +27,7 @@ export function getFlowCulturalRelicDetail(params) { ...@@ -27,7 +27,7 @@ export function getFlowCulturalRelicDetail(params) {
} }
// 查询流程关联的展览详情(手动添加的展览详情) // 查询流程关联的展览详情(手动添加的展览详情),用于驳回时重提
export function getFlowExhibitionDetail(params) { export function getFlowExhibitionDetail(params) {
return request({ return request({
url: '/bizFlow/flowExhibitionDetail', url: '/bizFlow/flowExhibitionDetail',
...@@ -36,7 +36,7 @@ export function getFlowExhibitionDetail(params) { ...@@ -36,7 +36,7 @@ export function getFlowExhibitionDetail(params) {
}) })
} }
// 带权限分页查询流程关联的文物信息 // 带权限分页查询流程关联的文物信息,用于需要切换文物的分页时
export function getListFlowCulturalRelicByPage(data) { export function getListFlowCulturalRelicByPage(data) {
return request({ return request({
url: '/bizFlow/listFlowCulturalRelicByPage', url: '/bizFlow/listFlowCulturalRelicByPage',
...@@ -53,4 +53,14 @@ export function getListByPagePer(data) { ...@@ -53,4 +53,14 @@ export function getListByPagePer(data) {
method: 'post', method: 'post',
data data
}) })
} }
\ No newline at end of file
// 审批
export function putFlowCheck(data) {
return request({
url: '/bizFlow/check',
method: 'put',
data
})
}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters, mapActions } from "vuex";
export default { export default {
name: "DictText", name: "DictText",
props: { props: {
...@@ -43,9 +43,12 @@ export default { ...@@ -43,9 +43,12 @@ export default {
}, },
async created() { async created() {
const { name, dictValue } = this; const { name, dictValue } = this;
await this.$store.dispatch("dict/getDictList", [name]); await this.getDictList([name]);
this.dictText = this.dicts[name][dictValue]; this.dictText = this.dicts[name][dictValue];
}, },
methods: {
...mapActions("dict", ["getDictList"]),
},
}; };
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>
...@@ -165,9 +165,6 @@ export default { ...@@ -165,9 +165,6 @@ export default {
showThemeColor: false, showThemeColor: false,
}; };
}, },
mounted() {
console.log(this.themeType);
},
methods: { methods: {
handleEnterTabItem(item) { handleEnterTabItem(item) {
if (item.name == "展览展示") { if (item.name == "展览展示") {
......
...@@ -44,19 +44,28 @@ ...@@ -44,19 +44,28 @@
export default { export default {
name: "TableOperation", name: "TableOperation",
props: { props: {
// 操作的按钮配置
operations: { operations: {
type: Array, type: Array,
}, },
// 点击的行对应的数据
rawData: { rawData: {
type: Object, type: Object,
}, },
// 删除时提示的标题
deleteTitle: { deleteTitle: {
type: String, type: String,
}, },
// 是否禁用
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
// 是否隐藏
hidden: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -70,6 +79,7 @@ export default { ...@@ -70,6 +79,7 @@ export default {
editPassword: "el-icon-lock", editPassword: "el-icon-lock",
approval: "el-icon-s-check", approval: "el-icon-s-check",
view3D: "three", view3D: "three",
reSubmit: "el-icon-upload2",
}, },
}; };
}, },
......
// 关于审核的常量 // 关于审核的常量和字典
export const APPROVAL_STATUS = {
PENDING_APPROVAL: {
export const checkStatus = [
{
value: 0, value: 0,
desc: '待审核' label: '审核中',
icon: 'el-icon-edit-outline',
tagType: 'primary',
stepType: '',
}, },
PASSED: { {
value: 1, value: 1,
desc: '已通过' label: '已通过',
icon: "el-icon-check",
tagType: 'success',
stepType: 'success'
}, },
FAILED: { {
value: -2,
label: '已驳回',
icon: 'el-icon-close',
tagType: 'danger',
stepType: 'error'
},
{
value: -1, value: -1,
desc: '未通过' label: '待提交',
type: 'wait',
tagType: 'warning',
stepType: 'el-icon-warning'
} }
} ]
\ No newline at end of file
// 关于审核的常量
export const APPROVAL_STATUS = {
PENDING_APPROVAL: {
value: 0,
desc: '待审核'
},
PASSED: {
value: 1,
desc: '已通过'
},
FAILED: {
value: -1,
desc: '未通过'
}
}
\ No newline at end of file
// 关于展览的常量 // 关于展览的一些常量和字典
export const THEME_TYPE = { export const THEME_TYPE = {
NORMAL_STYLE: { NORMAL_STYLE: {
...@@ -14,4 +14,31 @@ export const THEME_TYPE = { ...@@ -14,4 +14,31 @@ export const THEME_TYPE = {
value: '3', value: '3',
desc: '红色文化' desc: '红色文化'
} }
} }
\ No newline at end of file
// export const themeTypeCode = {
// 1: '默认主题',
// 2: '中国风',
// 3: '红色主题'
// }
// 关于审核的常量和字典
export const themeType = [
{
value: 1,
label: '默认主题',
},
{
value: 2,
label: '中国风',
},
{
value: 3,
label: '红色主题',
}
]
export const SOURCE_TYPE = {
展览: 'biz_exhibition',
文物: 'biz_cultural_relic' // 本文件提供前端定义的字典值的翻译功能
} // 增加时先引入,后在allList中添加
\ No newline at end of file import { checkStatus } from "./approval"
import { themeType } from "./display"
const constantsTool = {
allList: { checkStatus, themeType },
// 获取label
getLabelByValue(dictName, value) {
const list = constantsTool.allList[dictName]
if (!list) {
return ''
}
const item = list.find((item) => {
return item.value == value
})
if (!item) {
return ''
}
return item.label
},
// 获取字典列表
getList(dictName) {
return constantsTool.allList[dictName]
},
// 获取icon
getIconByValue(dictName, value) {
const list = constantsTool.allList[dictName]
if (!list) {
return ''
}
const item = list.find((item) => {
return item.value == value
})
if (!item) {
return ''
}
return item.icon
},
// 获取Type,用于展示tag状态 等
getTagTypeByValue(dictName, value) {
const list = constantsTool.allList[dictName]
if (!list) {
return ''
}
const item = list.find((item) => {
return item.value == value
})
if (!item) {
return ''
}
return item.tagType
},
// 获取Type,用于展示tag状态 等
getStepTypeByValue(dictName, value) {
const list = constantsTool.allList[dictName]
if (!list) {
return ''
}
const item = list.find((item) => {
return item.value == value
})
if (!item) {
return ''
}
return item.stepType
},
}
export default constantsTool
\ No newline at end of file
...@@ -112,7 +112,10 @@ ...@@ -112,7 +112,10 @@
@click.native="handleSubmitPwd" @click.native="handleSubmitPwd"
>保存</el-button >保存</el-button
> >
<el-button type="primary" size="mini" @click.native="handleCancelChangePwd" <el-button
type="primary"
size="mini"
@click.native="handleCancelChangePwd"
>取消</el-button >取消</el-button
> >
</el-form-item> </el-form-item>
...@@ -218,7 +221,7 @@ export default { ...@@ -218,7 +221,7 @@ export default {
}, },
async logout() { async logout() {
let res = await this.$store.dispatch("user/logout"); let res = await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`); this.$router.push(`/login`);
}, },
handleShowUserInfo() { handleShowUserInfo() {
......
...@@ -5,7 +5,9 @@ import { ...@@ -5,7 +5,9 @@ import {
} from '@/utils/index' } from '@/utils/index'
import { file } from '@/utils/file' import { file } from '@/utils/file'
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import constantsTool from '@/contants/index'
Vue.prototype.$getFullUrl = getFullUrl //获取文件的完整链接 Vue.prototype.$getFullUrl = getFullUrl //获取文件的完整链接
Vue.prototype.$echarts = echarts //Echarts Vue.prototype.$echarts = echarts //Echarts
Vue.prototype.$file = file //文件操作 Vue.prototype.$file = file //文件操作
\ No newline at end of file Vue.prototype.$constantsTool = constantsTool //前端定义的常量操作
\ No newline at end of file
...@@ -942,111 +942,6 @@ export default { ...@@ -942,111 +942,6 @@ export default {
.catch((err) => { .catch((err) => {
this.submitLoading = false; this.submitLoading = false;
}); });
// if (!that.dialogForm.exhibitionId) {
// this.loadingText = "正在处理展览数据...请耐心等待";
// const params = {
// ...this.dialogForm,
// exhibitionUnits: unitData,
// };
// params.literature = this.literatureIdArr.join(",");
// params.status = this.dialogForm.status ? 1 : 0;
// params.crIds = this.crIds.join(",");
// params.bvIds = this.vrIds.join(",");
// params.displayCharacter = 1; //传布展
// params.submitFlag = submitFlag;
// addDisplay(params)
// .then((res) => {
// if (res.code == 0) {
// setTimeout(() => {
// this.$emit("refresh");
// this.reload();
// this.submitLoading = false;
// this.$message.success("新增展览成功!");
// }, 1000);
// }
// })
// .catch((err) => {
// this.submitLoading = false;
// });
// } else {
// this.loadingText = "正在处理展览数据...请耐心等待";
// const {
// exhibitionId,
// title,
// type,
// keyword,
// intro,
// themeType,
// remark,
// faceImage,
// faceImageUrl,
// images,
// audios,
// videos,
// regionCode,
// deptId,
// displayCharacter,
// } = this.dialogForm;
// let literature = this.literatureIdArr.join(",");
// let crIds = this.crIds.join(",");
// let bvIds = this.vrIds.join(",");
// let status = this.dialogForm.status ? 1 : 0;
// // return;
// const params = {
// exhibitionId,
// title,
// type,
// keyword,
// intro,
// themeType,
// remark,
// audios,
// deptId,
// faceImage,
// faceImageUrl,
// images,
// regionCode,
// videos,
// status,
// literature,
// crIds,
// bvIds,
// displayCharacter,
// exhibitionUnits: unitData,
// };
// // 处理馆藏单位
// if (params.deptId instanceof Array) {
// params.deptId = params.deptId[params.deptId.length - 1];
// }
// if (deleteFileArr.length > 0) {
// await deleteFiles(deleteFileArr);
// }
// params.submitFlag = submitFlag;
// editDisplay(params)
// .then(async (res) => {
// let deleteRes;
// // console.log(res);
// // return
// if (res.code == 0) {
// this.$emit("refresh");
// this.reload();
// setTimeout(() => {
// this.loadingText = "上传完毕";
// this.submitLoading = false;
// this.$message.success("修改成功!");
// }, 1000);
// }
// })
// .catch((err) => {
// console.log("err", err);
// this.submitLoading = false;
// });
// }
} }
}); });
}, },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
top="3vh" top="3vh"
:before-close="handleClose" :before-close="handleClose"
lock-scroll lock-scroll
width="65vw"
> >
<div class="title" slot="title"> <div class="title" slot="title">
<div class="divider"></div> <div class="divider"></div>
...@@ -18,17 +19,24 @@ ...@@ -18,17 +19,24 @@
:name="item" :name="item"
> >
<ApprovalInfo <ApprovalInfo
:info="aprrovalInfo" :info="approvalInfo"
:flowId="detail.id"
:isShowApprovalForm="prviewType == 'approval'" :isShowApprovalForm="prviewType == 'approval'"
v-if="item == '流程详情'" v-if="item == '流程详情'"
/> />
<CulturalRelicBaseInfo <CulturalRelicBaseInfo
:info="culturalRelicBaseInfo" :info="culturalRelicDetailVo"
v-if="item == '文物基本信息'" v-if="item == '文物基本信息'"
/> />
<CulturalRelicTable :crList="crList" v-if="item == '文物列表'" /> <CulturalRelicTable
<DisplayBaseInfo :info="displayInfo" v-if="item == '展览基本信息'" /> :crList="culturalRelicPageVo"
<DisplayRender :info="displayInfo" v-if="item == '效果预览'" /> v-if="item == '文物列表'"
/>
<DisplayBaseInfo
:info="exhibitionDetailVo"
v-if="item == '展览基本信息'"
/>
<DisplayRender :info="exhibitionDetailVo" v-if="item == '效果预览'" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -58,7 +66,7 @@ export default { ...@@ -58,7 +66,7 @@ export default {
type: String, type: String,
default: "view", default: "view",
}, },
aprrovalInfo: { detail: {
type: Object, type: Object,
default: () => ({}), default: () => ({}),
}, },
...@@ -67,13 +75,13 @@ export default { ...@@ -67,13 +75,13 @@ export default {
...mapGetters(["dicts"]), ...mapGetters(["dicts"]),
tabs() { tabs() {
const tabs = ["流程详情"]; const tabs = ["流程详情"];
const { sourceType, addWay } = this.aprrovalInfo; const { sourceType, addWay } = this.detail;
switch (sourceType) { switch (sourceType) {
case "展览": case "展览展示":
tabs.push("展览基本信息", "效果预览"); tabs.push("展览基本信息", "效果预览");
break; break;
case "文物": case "文物":
if (addWay == "单个") { if (addWay == "手动添加") {
tabs.push("文物基本信息"); tabs.push("文物基本信息");
} else { } else {
tabs.push("文物列表"); tabs.push("文物列表");
...@@ -82,17 +90,89 @@ export default { ...@@ -82,17 +90,89 @@ export default {
} }
return tabs; return tabs;
}, },
approvalInfo() {
if (!this.detail) {
return {};
}
const {
title,
addWay,
sourceType,
createTime,
deptName,
checkStatus,
remark,
createName,
checkDetailList,
culturalRelicDetailVo,
culturalRelicPageVo,
exhibitionDetailVo,
} = this.detail;
const approvalInfo = {
title,
addWay,
sourceType,
createTime,
deptName,
checkStatus,
remark,
createName,
checkDetailList,
};
return approvalInfo;
},
culturalRelicDetailVo() {
if (!this.detail) {
return {};
}
const { culturalRelicDetailVo } = this.detail;
return culturalRelicDetailVo;
},
culturalRelicPageVo() {
if (!this.detail) {
return {};
}
const { culturalRelicPageVo } = this.detail;
return culturalRelicPageVo;
},
culturalRelicPageVo() {
if (!this.detail) {
return {};
}
const { culturalRelicPageVo } = this.detail;
return culturalRelicPageVo;
},
exhibitionDetailVo() {
if (!this.detail) {
return {};
}
const { exhibitionDetailVo } = this.detail;
return exhibitionDetailVo;
},
}, },
data() { data() {
return { return {
visible: false, visible: false,
activeName: "流程详情", activeName: "流程详情",
culturalRelicBaseInfo: cr, //单个文物的信息 // approvalInfo: {}, //传给ApprovalInfo组件的
crList, // culturalRelicDetailVo: {}, //传给CulturalRelicBaseInfo组件的
displayInfo: display, // culturalRelicPageVo: {}, //传给CulturalRelicTable组件的
// exhibitionDetailVo: {}, //传给DisplayBaseInfo和DisplayRender组件的
}; };
}, },
created() {
// this.init();
},
methods: { methods: {
init() {
// this.culturalRelicDetailVo = culturalRelicPageVo;
// this.culturalRelicPageVo = culturalRelicPageVo;
// this.exhibitionDetailVo = exhibitionDetailVo;
},
handleClose(done) { handleClose(done) {
this.visible = false; this.visible = false;
this.activeName = "流程详情"; this.activeName = "流程详情";
......
...@@ -31,22 +31,39 @@ ...@@ -31,22 +31,39 @@
<el-form-item> <el-form-item>
<el-button <el-button
size="mini" size="mini"
style="margin:0; width: 100%" style="margin: 0 10px 0; width: calc((100% - 20px) / 2)"
type="primary" type="primary"
icon="el-icon-check" icon="el-icon-check"
@click.native="handleCheck" @click.native="handleCheck"
>确定</el-button >确定</el-button
> >
<el-button
size="mini"
style="margin: 0; width: calc((100% - 20px) / 2)"
type="primary"
icon="el-icon-close"
@click.native="handleCancel"
plain
>取消</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import { putFlowCheck } from "@/api/approval";
export default { export default {
props: {
// 流程id
flowId: {
type: String,
default: "",
},
},
data() { data() {
return { return {
checkStatus: 1, checkStatus: 1, //1同意 -2驳回
dialogForm: { dialogForm: {
remark: "", //驳回意见 remark: "", //驳回意见
}, },
...@@ -62,48 +79,33 @@ export default { ...@@ -62,48 +79,33 @@ export default {
}; };
}, },
methods: { methods: {
async handleCheck() { handleCheck() {
const { checkStatus } = this; const { checkStatus } = this;
if (checkStatus == -2) { if (checkStatus == -2) {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
if (valid) { if (valid) {
this.dialogLoading = true; const { remark } = this.dialogForm;
const params = { this.submit(checkStatus, remark);
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.handleClose();
this.$emit("refresh");
this.$refs.form.resetFields();
}
this.dialogLoading = false;
this.popoverVisible = false;
} }
}); });
} else { } else {
this.dialogLoading = true; this.submit(checkStatus);
const params = { }
sourceId: this.displayDetail.exhibitionId, },
checkStatus,
remark: this.dialogForm.remark, async submit(checkStatus, remark) {
sourceType: "biz_exhibition", const params = {
sourceName: this.displayDetail.title, checkStatus,
}; remark,
let res = await postCheck(params); id: this.flowId,
if (res.code == 0) { };
this.$message.success("操作成功!"); if (!remark) {
this.handleClose(); params.remark = "";
this.$emit("refresh"); }
this.$refs.form.resetFields(); let res = await postCheck(params);
} if (res.code == 0) {
this.dialogLoading = false; this.$message.success("操作成功!");
this.popoverVisible = false; this.$refs.form.resetFields();
} }
}, },
}, },
......
...@@ -7,37 +7,57 @@ ...@@ -7,37 +7,57 @@
:label="item.label" :label="item.label"
v-for="(item, index) in approvleTableTitle" v-for="(item, index) in approvleTableTitle"
:key="index" :key="index"
>{{ info[item.prop] }}</el-descriptions-item
> >
<span v-if="item.prop === 'checkStatus'">
<el-tag
size="mini"
:type="
$constantsTool.getTagTypeByValue('checkStatus', info[item.prop])
"
>
{{
$constantsTool.getLabelByValue("checkStatus", info[item.prop])
}}
</el-tag>
</span>
<span v-else>{{ info[item.prop] }}</span>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card shadow="hover" class="card"> <el-card shadow="hover" class="card">
<h3>详细流程节点</h3> <h3>详细流程节点</h3>
<el-steps :active="historyChecks.length"> <el-steps
:active="info.checkDetailList.length"
align-center
v-if="info.checkDetailList.length > 0"
>
<el-step <el-step
v-for="(item, index) in historyChecks" v-for="(item, index) in info.checkDetailList"
:title="getStepTitle(item)" :title="item.statusName"
:description="item.remark"
:status="
$constantsTool.getStepTypeByValue('checkStatus', item.status)
"
:key="index" :key="index"
:icon="getStepIcon(item)" :icon="$constantsTool.getIconByValue('checkStatus', item.status)"
> >
<div slot="description"> <div slot="description">
<div class="name">{{ item.createName }}</div> <div class="name">{{ item.optUserName }}</div>
<div class="time">{{ item.createTime }}</div> <div class="time">{{ item.createTime }}</div>
<div class="desc">{{ item.remark }}</div>
</div> </div>
</el-step> </el-step>
</el-steps> </el-steps>
<span v-else></span>
</el-card> </el-card>
<el-card v-if="isShowApprovalForm"> <el-card v-if="isShowApprovalForm">
<h3>请审批</h3> <h3>请审批</h3>
<ApprovalForm /> <ApprovalForm :flowId="flowId" />
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { approvleTableTitle } from "../../config"; import { approvleTableTitle } from "../../config";
import { historyChecks } from "../../mock";
import ApprovalForm from "./ApprovalForm.vue"; import ApprovalForm from "./ApprovalForm.vue";
export default { export default {
name: "AprrovalInfo", name: "AprrovalInfo",
...@@ -50,6 +70,10 @@ export default { ...@@ -50,6 +70,10 @@ export default {
type: Object, type: Object,
default: () => ({}), default: () => ({}),
}, },
flowId: {
type: String,
default: "",
},
// 是否展示审核的表单 // 是否展示审核的表单
isShowApprovalForm: { isShowApprovalForm: {
type: Boolean, type: Boolean,
...@@ -69,30 +93,25 @@ export default { ...@@ -69,30 +93,25 @@ export default {
} }
}; };
}, },
getStepIcon(item) {
return (item) => {
switch (item.checkStatus) {
case 0:
return "el-icon-s-promotion";
case 1:
return "el-icon-s-claim";
case -2:
return "el-icon-circle-close";
}
};
},
}, },
data() { data() {
return { return {
approvleTableTitle, approvleTableTitle,
historyChecks, //mock历史记录,后期通过后端接口返
}; };
}, },
mounted() {
console.log(this.info);
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.card { .card {
margin-bottom: 20px; margin-bottom: 20px;
.name {
}
.status {
}
} }
</style> </style>
...@@ -8,15 +8,18 @@ ...@@ -8,15 +8,18 @@
v-for="(item, index) in crTabletitle" v-for="(item, index) in crTabletitle"
:key="index" :key="index"
> >
<el-image <div v-if="item.prop == 'faceImagePressUrl'">
class="image" <el-image
v-if="item.prop == 'faceImagePressUrl'" v-if="info['faceImagePressUrl']"
:src="info['faceImagePressUrl']" class="image"
fit="contain" :src="info['faceImagePressUrl']"
:preview-src-list="[info['faceImageUrl']]" fit="contain"
> :preview-src-list="[info['faceImageUrl']]"
</el-image> >
<div v-else-if="item.prop == 'imagesVo' && info.imagesVo.length > 0"> </el-image>
<span v-else></span>
</div>
<div v-else-if="item.prop == 'imagesVo'">
<el-image <el-image
v-for="(v, i) in info['imagesVo']" v-for="(v, i) in info['imagesVo']"
:key="i" :key="i"
...@@ -26,6 +29,7 @@ ...@@ -26,6 +29,7 @@
:preview-src-list="imgsList" :preview-src-list="imgsList"
> >
</el-image> </el-image>
<span v-if="info['imagesVo'].length == 0"></span>
</div> </div>
<div v-else-if="item.prop == 'videosVo'"> <div v-else-if="item.prop == 'videosVo'">
<VideoPlayer <VideoPlayer
...@@ -34,6 +38,7 @@ ...@@ -34,6 +38,7 @@
:key="i" :key="i"
:src="v.url" :src="v.url"
/> />
<span v-if="info['videosVo'].length == 0"></span>
</div> </div>
<div v-else-if="item.prop == 'audiosVo'"> <div v-else-if="item.prop == 'audiosVo'">
<AudioPlayer <AudioPlayer
...@@ -42,9 +47,15 @@ ...@@ -42,9 +47,15 @@
:url="v.url" :url="v.url"
ref="AudioPlayer" ref="AudioPlayer"
/> />
<span v-if="info['audiosVo'].length == 0"></span>
</div> </div>
<div v-else-if="item.prop == 'literatureVo'"> <div v-else-if="item.prop == 'literatureVo'">
<el-table stripe border :data="info['literatureVo']"> <el-table
stripe
border
:data="info['literatureVo']"
v-if="info['literatureVo'].length > 0"
>
<el-table-column prop="name" label="名称"></el-table-column> <el-table-column prop="name" label="名称"></el-table-column>
<el-table-column prop="authors" label="作者"></el-table-column> <el-table-column prop="authors" label="作者"></el-table-column>
<el-table-column prop="source" label="来源"></el-table-column> <el-table-column prop="source" label="来源"></el-table-column>
...@@ -54,6 +65,7 @@ ...@@ -54,6 +65,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span v-if="info['literatureVo'].length == 0"></span>
</div> </div>
<div v-else-if="item.prop === 'intro'" v-html="info['intro']"></div> <div v-else-if="item.prop === 'intro'" v-html="info['intro']"></div>
<span v-else>{{ info[item.prop] || "无" }}</span> <span v-else>{{ info[item.prop] || "无" }}</span>
......
...@@ -8,14 +8,38 @@ ...@@ -8,14 +8,38 @@
v-for="(item, index) in displayTabletitle" v-for="(item, index) in displayTabletitle"
:key="index" :key="index"
> >
<el-image <div v-if="item.prop == 'intro'">
class="image" <span v-if="info['intro']">{{ info["intro"] }}</span>
v-if="item.prop == 'faceImagePressUrl'" <span v-else></span>
:src="info['faceImagePressUrl']" </div>
fit="contain" <!-- 展览类型 -->
:preview-src-list="[info['faceImageUrl']]" <div v-else-if="item.prop === 'type'">
> <DictText
</el-image> name="displayType"
:dictValue="info['type']"
v-if="info['type']"
/>
<span v-else></span>
</div>
<!-- 模板主题 -->
<div v-else-if="item.prop == 'themeType'">
<span v-if="info['themeType']">{{
$constantsTool.getLabelByValue("themeType", info["themeType"])
}}</span>
<span v-else></span>
</div>
<div v-else-if="item.prop == 'faceImagePressUrl'">
<el-image
v-if="info['faceImagePressUrl']"
class="image"
:src="info['faceImagePressUrl']"
fit="contain"
:preview-src-list="[info['faceImageUrl']]"
>
</el-image>
<span v-else></span>
</div>
<div v-else-if="item.prop == 'imagesVo'"> <div v-else-if="item.prop == 'imagesVo'">
<div v-if="info['imagesVo'].length > 0"> <div v-if="info['imagesVo'].length > 0">
<el-image <el-image
...@@ -28,7 +52,7 @@ ...@@ -28,7 +52,7 @@
> >
</el-image> </el-image>
</div> </div>
<span v-else>暂无音频</span> <span v-else></span>
</div> </div>
<div v-else-if="item.prop == 'videosVo'"> <div v-else-if="item.prop == 'videosVo'">
<div v-if="info['videosVo'].length > 0"> <div v-if="info['videosVo'].length > 0">
...@@ -39,7 +63,7 @@ ...@@ -39,7 +63,7 @@
:src="v.url" :src="v.url"
/> />
</div> </div>
<span v-else>暂无音频</span> <span v-else></span>
</div> </div>
<div v-else-if="item.prop == 'audiosVo'"> <div v-else-if="item.prop == 'audiosVo'">
<div v-if="info['audiosVo'].length > 0"> <div v-if="info['audiosVo'].length > 0">
...@@ -50,7 +74,7 @@ ...@@ -50,7 +74,7 @@
ref="AudioPlayer" ref="AudioPlayer"
/> />
</div> </div>
<span v-else>暂无音频</span> <span v-else></span>
</div> </div>
<div v-else-if="item.prop == 'literatureVo'"> <div v-else-if="item.prop == 'literatureVo'">
<div v-if="info['literatureVo'].length > 0"> <div v-if="info['literatureVo'].length > 0">
...@@ -71,9 +95,7 @@ ...@@ -71,9 +95,7 @@
v-else-if="item.prop === 'intro'" v-else-if="item.prop === 'intro'"
:richText="info['intro']" :richText="info['intro']"
></RichTextShow> ></RichTextShow>
<div v-else-if="item.prop === 'type'">
<DictText name="displayType" :dictValue="info['type']" />
</div>
<span v-else>{{ info[item.prop] || "无" }}</span> <span v-else>{{ info[item.prop] || "无" }}</span>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
......
// 展览的展示字段
export const displayTabletitle = [{ export const displayTabletitle = [{
prop: "title", prop: "title",
label: "标题", label: "标题",
...@@ -93,34 +94,40 @@ export const operates = { ...@@ -93,34 +94,40 @@ export const operates = {
columnAlign: "center", columnAlign: "center",
} }
// export const approvalOperations = [ export const viewButton = {
// { type: 'view',
// type: 'approval', title: '查看详情'
// title: '审批' }
// } export const approvalButton = {
// ] type: 'approval',
title: '审批'
}
// export const viewOperations = [{ export const reSubmitButtton = {
// type: 'view', type: 'reSubmit',
// title: '查看详情' title: '重新上传'
// } }
// ]
export const operations = [
{
type: 'view',
title: '查看详情'
},
{
type: 'approval',
title: '审批'
}
]
// export const operations = [
// {
// type: 'view',
// title: '查看详情'
// },
// {
// type: 'approval',
// title: '审批'
// },
// {
// type: 'reSubmit',
// title: '重新上传'
// }
// ]
// 文物的展示字段
export const crTabletitle = [{ export const crTabletitle = [{
prop: "name", prop: "name",
label: "名称", label: "名称",
...@@ -149,11 +156,11 @@ export const crTabletitle = [{ ...@@ -149,11 +156,11 @@ export const crTabletitle = [{
columnAlign: 'center', columnAlign: 'center',
isCulturalRelicType: true isCulturalRelicType: true
}, },
{ // {
prop: "createId", // prop: "createId",
label: "创建人", // label: "创建人",
columnAlign: 'center', // columnAlign: 'center',
}, // },
{ {
prop: "createTime", prop: "createTime",
label: "创建时间", label: "创建时间",
...@@ -265,6 +272,8 @@ export const importOperations = [{ ...@@ -265,6 +272,8 @@ export const importOperations = [{
title: '删除记录及文物' title: '删除记录及文物'
},] },]
// 审批列表的展示字段
export const approvleTableTitle = [ export const approvleTableTitle = [
{ {
prop: "title", prop: "title",
...@@ -290,10 +299,9 @@ export const approvleTableTitle = [ ...@@ -290,10 +299,9 @@ export const approvleTableTitle = [
prop: "checkStatus", prop: "checkStatus",
label: "审核状态", label: "审核状态",
columnAlign: 'center', columnAlign: 'center',
isStatus: true
}, },
{ {
prop: "createUser", prop: "createName",
label: "创建人", label: "创建人",
columnAlign: 'center', columnAlign: 'center',
}, },
......
...@@ -9,17 +9,35 @@ ...@@ -9,17 +9,35 @@
:operates="operates" :operates="operates"
v-loading="loading" v-loading="loading"
> >
<template v-slot:status="data"> <template v-slot:checkStatus="data">
<el-tag type="primary" v-if="data.scope.status == 0"> 待审核 </el-tag> <el-tag type="primary" v-if="data.scope.checkStatus == 0">
<el-tag type="success" v-if="data.scope.status == 1"> 已通过 </el-tag> {{
<el-tag type="danger" v-if="data.scope.status == -2"> 已驳回 </el-tag> $constantsTool.getLabelByValue(
"checkStatus",
data.scope.checkStatus
)
}}
</el-tag>
<el-tag type="success" v-if="data.scope.checkStatus == 1">
{{
$constantsTool.getLabelByValue(
"checkStatus",
data.scope.checkStatus
)
}}
</el-tag>
<el-tag type="danger" v-if="data.scope.checkStatus == -2">
{{
$constantsTool.getLabelByValue(
"checkStatus",
data.scope.checkStatus
)
}}
</el-tag>
</template> </template>
<!-- <template v-slot:displayType="data">
{{ dicts.displayType[data.scope.type] }}
</template> -->
<template v-slot:operates="scope"> <template v-slot:operates="scope">
<TableOperation <TableOperation
:operations="operations" :operations="getOperation(scope.scope.row)"
:rawData="scope.scope.row" :rawData="scope.scope.row"
@handleOperation="handleOperation" @handleOperation="handleOperation"
> >
...@@ -40,7 +58,7 @@ ...@@ -40,7 +58,7 @@
</el-pagination> </el-pagination>
<PreviewDialog <PreviewDialog
ref="PreviewDialog" ref="PreviewDialog"
:aprrovalInfo="aprrovalInfo" :detail="aprrovalDetail"
:prviewType="prviewType" :prviewType="prviewType"
:dicts="dicts" :dicts="dicts"
@handleClose="handleClosePreviewDialog" @handleClose="handleClosePreviewDialog"
...@@ -51,10 +69,16 @@ ...@@ -51,10 +69,16 @@
<script> <script>
import PreviewDialog from "./components/PreviewDialog.vue"; import PreviewDialog from "./components/PreviewDialog.vue";
import { approvleTableTitle, operates, operations } from "./config"; import {
import { getFlowListPagePer } from "@/api/approval"; approvleTableTitle,
operates,
viewButton,
approvalButton,
reSubmitButtton,
} from "./config";
import { getFlowListPagePer, getFlowDetailById } from "@/api/approval";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { approvalData } from "./mock"; import { operations } from "../boutique/config";
export default { export default {
components: { components: {
PreviewDialog, PreviewDialog,
...@@ -90,32 +114,38 @@ export default { ...@@ -90,32 +114,38 @@ export default {
], ],
}, },
{ {
prop: "status", prop: "checkStatus",
type: "select", type: "select",
label: "审核状态", label: "审核状态",
selectOptions: [ selectOptions: this.$constantsTool.getList("checkStatus"),
{
label: "已审核",
value: "true",
},
{
label: "待审核",
value: "false",
},
],
}, },
], ],
loading: false, loading: false,
previewDialogVisible: false, //预览可见性 previewDialogVisible: false, //预览可见性
aprrovalInfo: {}, //审核的相关信息 aprrovalDetail: {}, //审核的相关信息
prviewType: "view", //预览类型,view-查看详情,approval-审批 prviewType: "view", //预览类型,view-查看详情,approval-审批
operates, operates,
operations, // operations,
approvleTableTitle, approvleTableTitle,
}; };
}, },
computed: { computed: {
...mapGetters(["dicts"]), ...mapGetters(["dicts", "userInfo"]),
getOperation(row) {
return (row) => {
return [viewButton, approvalButton, reSubmitButtton];
// const isAdmin = roles.find(item=>{
// return
// })
// 管理员2种
// 1 查看详情和审批
// 2 查看详情 管理员操作——已审核、被驳回的条目能够操作的
// 普通人2种
// 1 查看详情
// 2 重传-当被驳回时
};
},
}, },
async created() { async created() {
await this.$store.dispatch("dict/getDictList", ["displayType"]); await this.$store.dispatch("dict/getDictList", ["displayType"]);
...@@ -128,8 +158,6 @@ export default { ...@@ -128,8 +158,6 @@ export default {
reset() { reset() {
this.loadData(); this.loadData();
}, },
// 加载表格数据
async loadData(form) { async loadData(form) {
this.loading = true; this.loading = true;
const params = { const params = {
...@@ -144,12 +172,31 @@ export default { ...@@ -144,12 +172,31 @@ export default {
this.loading = false; this.loading = false;
}, },
async handleOperation(value, row) { handleOperation(value, row) {
console.log(value, row);
const { type } = value; const { type } = value;
if (type == "view" || type == "approval") {
this.viewOrApproval(type, row);
} else {
// 重新上传
this.resubmit(row);
}
},
// 编辑或者审核,(都要查看详情,审核多了个表单)
async viewOrApproval(type, row) {
this.prviewType = type; this.prviewType = type;
this.aprrovalInfo = row; const { id } = row;
this.$refs.PreviewDialog.visible = true; const res = await getFlowDetailById(id);
if (res.code == 0) {
this.aprrovalDetail = res.data;
this.$refs.PreviewDialog.visible = true;
} else {
return;
}
},
resubmit(row) {
const { addWay, sourceType } = row;
// const isMultiCr = addWay==''
}, },
// 多选 // 多选
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
:before-close="handleClose" :before-close="handleClose"
top="5vh" top="5vh"
lock-scroll lock-scroll
v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.5)" v-loading="loading"
element-loading-background="rgba(0, 0, 0, 0.5)"
> >
<div class="title" slot="title"> <div class="title" slot="title">
<div class="divider"></div> <div class="divider"></div>
...@@ -14,7 +15,7 @@ ...@@ -14,7 +15,7 @@
</div> </div>
<div class="dialog-content"> <div class="dialog-content">
<el-form <el-form
size="mini" size="mini"
:model="dialogForm" :model="dialogForm"
class="basic-info" class="basic-info"
:rules="rules" :rules="rules"
...@@ -40,14 +41,18 @@ ...@@ -40,14 +41,18 @@
:data="allRole" :data="allRole"
show-checkbox show-checkbox
check-on-click-node check-on-click-node
check-strictly
node-key="id" node-key="id"
@check="roleParentTreeCheck" @check="roleParentTreeCheck"
ref="roleParentTree" ref="roleParentTree"
highlight-current highlight-current
:props="{ label: 'name' }" :props="{ label: 'name' }"
check-strictly
:default-checked-keys="[dialogForm.pid]" :default-checked-keys="[dialogForm.pid]"
:default-expanded-keys="[dialogForm.pid]"
> >
<!-- <span slot-scope="{ node, data }">
{{ data.id }}
</span> -->
</el-tree> </el-tree>
</el-form-item> </el-form-item>
<el-form-item label="菜单权限" :label-width="formLabelWidth"> <el-form-item label="菜单权限" :label-width="formLabelWidth">
...@@ -80,7 +85,7 @@ ...@@ -80,7 +85,7 @@
></el-button> ></el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { import {
...@@ -141,14 +146,14 @@ export default { ...@@ -141,14 +146,14 @@ export default {
}, },
}, },
data() { data() {
var validatePid = (rule, value, callback)=>{ var validatePid = (rule, value, callback) => {
let arr = this.$refs.roleParentTree.getCheckedKeys(); // 在此获取选中的树形数据 let arr = this.$refs.roleParentTree.getCheckedKeys(); // 在此获取选中的树形数据
if (arr.length == 0 || !arr) { if (arr.length == 0 || !arr) {
callback(new Error("请选择所属角色")); callback(new Error("请选择所属角色"));
} else { } else {
callback(); callback();
} }
} };
return { return {
dialogForm: {}, dialogForm: {},
formLabelWidth: "100px", formLabelWidth: "100px",
...@@ -171,14 +176,14 @@ export default { ...@@ -171,14 +176,14 @@ export default {
pid: [ pid: [
{ {
required: true, required: true,
validator:validatePid, validator: validatePid,
// message: "请选择所属角色", // message: "请选择所属角色",
trigger: "blur", trigger: "blur",
}, },
], ],
}, },
allRole: [], allRole: [],
loading:false loading: false,
}; };
}, },
...@@ -192,11 +197,13 @@ export default { ...@@ -192,11 +197,13 @@ export default {
handleSubmit() { handleSubmit() {
this.$refs.dialogForm.validate(async (valid) => { this.$refs.dialogForm.validate(async (valid) => {
if (valid) { if (valid) {
this.loading = true this.loading = true;
const { name, remark } = this.dialogForm; const { name, remark } = this.dialogForm;
let status = this.status ? 1 : 0; let status = this.status ? 1 : 0;
let permissions = this.$refs.menuPermisionTree.getCheckedKeys(); const checkedKeys = this.$refs.menuPermisionTree.getCheckedKeys();
const halfCheckedKeys =
this.$refs.menuPermisionTree.getHalfCheckedKeys(); //半选中的也要传到后台
const permissions = [...checkedKeys, ...halfCheckedKeys];
const params = { const params = {
name, name,
status, status,
...@@ -208,7 +215,6 @@ export default { ...@@ -208,7 +215,6 @@ export default {
let pid = parentIdArr.toString(); let pid = parentIdArr.toString();
params.pid = pid; params.pid = pid;
} }
// return
if (this.dialogForm.id) { if (this.dialogForm.id) {
params.id = this.dialogForm.id; params.id = this.dialogForm.id;
let res = await upadateRole(params); let res = await upadateRole(params);
...@@ -216,17 +222,15 @@ export default { ...@@ -216,17 +222,15 @@ export default {
this.$message.success("修改成功!"); this.$message.success("修改成功!");
this.reload(); this.reload();
} }
this.loading = false this.loading = false;
} else { } else {
params.dataScope = "5"; //默认数据权限为自己 params.dataScope = "5"; //默认数据权限为自己
// return
let res = await addRole(params); let res = await addRole(params);
if (res.code == 0) { if (res.code == 0) {
this.$message.success("添加成功!"); this.$message.success("添加成功!");
this.reload(); this.reload();
} }
this.loading = false this.loading = false;
} }
} }
}); });
...@@ -290,11 +294,31 @@ export default { ...@@ -290,11 +294,31 @@ export default {
this.$refs.roleParentTree.setCheckedKeys([node.id]); this.$refs.roleParentTree.setCheckedKeys([node.id]);
} }
}, },
// checkNode(node) {
// if (!node.checked) {
// // this.check(node);
// // debugger;
// this.$refs.menuPermisionTree.setChecked(node.id, true);
// // node.checked = true;
// if (node.parent) {
// this.checkNode(node.parent);
// }
// }
// },
// handleCheckPermissonChange(data, checked) {
// // 检查子节点
// if (data.children) {
// data.children.forEach((child) => {
// this.checkNode(child);
// });
// }
// },
}, },
}; };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.title { .title {
display: flex; display: flex;
margin-bottom: 16px; margin-bottom: 16px;
...@@ -320,4 +344,4 @@ export default { ...@@ -320,4 +344,4 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论