|
|
@@ -0,0 +1,360 @@
|
|
|
+<!-- -->
|
|
|
+<template>
|
|
|
+ <div class="holdingAdd">
|
|
|
+ <TabList :ind='3'/>
|
|
|
+ <div class="right">
|
|
|
+ <div class="top">
|
|
|
+ <el-breadcrumb separator="/">
|
|
|
+ <el-breadcrumb-item to="">首页</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item to="">馆藏管理</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item>征集品修改</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item id="mytitle">审核</el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ </div>
|
|
|
+ <div class="conten">
|
|
|
+ <div class="con_top">
|
|
|
+ <div><span>征集品名称:</span>{{myObj.name}}</div>
|
|
|
+ <div><span>总登记号:</span>{{myObj.num}}</div>
|
|
|
+ <div><span>编辑登记人:</span>{{myObj.realName}}</div>
|
|
|
+ <div><span>编辑时间:</span>{{myObj.updateTime}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="con_edit">
|
|
|
+ <div class="title">修改记录
|
|
|
+ <el-button size="small" @click="look">查 看</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="editChange">
|
|
|
+ <div style="width:200px">修改内容</div>
|
|
|
+ <div style="width:650px">修改前</div>
|
|
|
+ <div style="flex: 1;">修改后</div>
|
|
|
+ </div>
|
|
|
+ <div class="father">
|
|
|
+ <div class="con_txt" v-for="(item,index) in editData" :key="index">
|
|
|
+ <div style="width:200px">{{item.name}}</div>
|
|
|
+ <div style="width:650px">{{item.qian?item.qian:'-'}}</div>
|
|
|
+ <div style="flex: 1;">{{item.hou?item.hou:'-'}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="txt">
|
|
|
+ <el-form
|
|
|
+ :model="fromData"
|
|
|
+ :rules="rules"
|
|
|
+ ref="fromData"
|
|
|
+ label-width="100px"
|
|
|
+ class="demo-ruleForm"
|
|
|
+ >
|
|
|
+ <el-form-item label="审核结果:" prop="status">
|
|
|
+ <el-select v-model="fromData.status" placeholder="请选择">
|
|
|
+ <el-option label="通过" :value="3"></el-option>
|
|
|
+ <el-option label="不通过" :value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item
|
|
|
+ label="审核说明:"
|
|
|
+ prop="reason"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="3"
|
|
|
+ v-model="fromData.reason"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <!-- 最下面的按钮 -->
|
|
|
+ <div class="button">
|
|
|
+ <el-button type="primary" @click="submit">提交</el-button>
|
|
|
+ <el-button @click="$router.go(-1)">返回</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 点击查看显示弹窗 -->
|
|
|
+ <Collect3Dia :dialogFormVisible.sync='isShow' :myObj='myObjLook' ref="mylook"/>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import Collect3Dia from './collect3_audit_Dia.vue'
|
|
|
+import { getDetailById, clickAudit } from '@/apis/collect3'
|
|
|
+import TabList from '@/components/tabLeft2.vue'
|
|
|
+export default {
|
|
|
+ name: 'collect3_audit',
|
|
|
+ // import引入的组件需要注入到对象中才能使用
|
|
|
+ components: { TabList, Collect3Dia },
|
|
|
+ data () {
|
|
|
+ // 这里存放数据
|
|
|
+ return {
|
|
|
+ fujianLook: [],
|
|
|
+ myObjLook: {},
|
|
|
+ isShow: false,
|
|
|
+ myObj: {},
|
|
|
+ // 字典
|
|
|
+ dictionaries: {
|
|
|
+ age: '年代',
|
|
|
+ amount: '具体数量',
|
|
|
+ amountType: '数量类型',
|
|
|
+ checkInScope: '入藏时间范围',
|
|
|
+ checkInYear: '入藏年度',
|
|
|
+ goodsTypeId: '文物类别',
|
|
|
+ height: '通高',
|
|
|
+ integrity: '完残程度',
|
|
|
+ length: '通长',
|
|
|
+ level: '文物级别',
|
|
|
+ name: '藏品名称',
|
|
|
+ num: '藏品编号',
|
|
|
+ numTypeId: '编号类型',
|
|
|
+ primitiveName: '原名',
|
|
|
+ quality: '具体质量',
|
|
|
+ qualityScope: '质量范围',
|
|
|
+ registerNum: '总登记号',
|
|
|
+ repair: '保存状态',
|
|
|
+ repairRemark: '完残状况',
|
|
|
+ texture: '质地',
|
|
|
+ textureCategory: '质地类别',
|
|
|
+ textureType: '文物质地',
|
|
|
+ thumb: '藏品图片',
|
|
|
+ width: '通宽'
|
|
|
+ },
|
|
|
+ editData: [
|
|
|
+ // { name: '完残程度', qian: '基本完整', hou: '部分残缺' }
|
|
|
+ ],
|
|
|
+ fromData: {
|
|
|
+ id: null,
|
|
|
+ reason: '',
|
|
|
+ status: 3
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ reason: [
|
|
|
+ { required: true, message: '不能为空', trigger: 'blur' },
|
|
|
+ { max: 255, message: '不能超过255个字符', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ status: [
|
|
|
+ { required: true, message: '请选择活动区域', trigger: 'change' }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 监听属性 类似于data概念
|
|
|
+ computed: {},
|
|
|
+ // 监控data中的数据变化
|
|
|
+ watch: {},
|
|
|
+ // 方法集合
|
|
|
+ methods: {
|
|
|
+ // 点击查看
|
|
|
+ look () {
|
|
|
+ this.isShow = true
|
|
|
+ },
|
|
|
+ // 点击提交
|
|
|
+ async submit () {
|
|
|
+ try {
|
|
|
+ await this.$refs.fromData.validate()
|
|
|
+ this.$confirm('是否确认提交?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await clickAudit(this.fromData)
|
|
|
+ // console.log(99999999, res)
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.$message.success('审核成功')
|
|
|
+ this.$router.push('/layout/collect3')
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消提交'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ async created () {
|
|
|
+ this.myObj = this.$route.query
|
|
|
+ this.fromData.id = Number(this.$route.query.id)
|
|
|
+ // 获取上个页面传递的数据
|
|
|
+ const res = await getDetailById(this.myObj.id)
|
|
|
+ const oldObj = res.data.goods
|
|
|
+ if (oldObj.amountType === 0) oldObj.amountType = '单件'
|
|
|
+ else if (oldObj.amountType === 1) oldObj.amountType = '一套多件'
|
|
|
+ if (oldObj.textureType === 0) oldObj.textureType = '单一质地'
|
|
|
+ else if (oldObj.textureType === 1) oldObj.textureType = '复合质地'
|
|
|
+ oldObj.goodsTypeId = this.category(oldObj.goodsTypeId)
|
|
|
+ oldObj.integrity = this.spoil(oldObj.integrity)
|
|
|
+ oldObj.level = this.myWwjb(oldObj.level)
|
|
|
+ oldObj.numTypeId = this.mycategory(oldObj.numTypeId)
|
|
|
+ oldObj.repair = this.mySave(oldObj.repair)
|
|
|
+ if (oldObj.thumb) {
|
|
|
+ const temp = oldObj.thumb.split('/')
|
|
|
+ oldObj.thumb = temp[temp.length - 1]
|
|
|
+ }
|
|
|
+ const newObj = res.data.backupGoods
|
|
|
+ if (newObj.amountType === 0) newObj.amountType = '单件'
|
|
|
+ else if (newObj.amountType === 1) newObj.amountType = '一套多件'
|
|
|
+ if (newObj.textureType === 0) newObj.textureType = '单一质地'
|
|
|
+ else if (newObj.textureType === 1) newObj.textureType = '复合质地'
|
|
|
+ newObj.goodsTypeId = this.category(newObj.goodsTypeId)
|
|
|
+ newObj.integrity = this.spoil(newObj.integrity)
|
|
|
+ newObj.level = this.myWwjb(newObj.level)
|
|
|
+ newObj.numTypeId = this.mycategory(newObj.numTypeId)
|
|
|
+ newObj.repair = this.mySave(newObj.repair)
|
|
|
+ // 把新的数据给查看弹窗
|
|
|
+ this.myObjLook = { ...newObj }
|
|
|
+ if (newObj.thumb) {
|
|
|
+ const temp = newObj.thumb.split('/')
|
|
|
+ newObj.thumb = temp[temp.length - 1]
|
|
|
+ }
|
|
|
+ for (const k in oldObj) {
|
|
|
+ if (oldObj[k] !== newObj[k] && this.dictionaries[k]) {
|
|
|
+ this.editData.push({ name: this.dictionaries[k], qian: oldObj[k], hou: newObj[k] })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 对比附件
|
|
|
+ const oldFujian = res.data.goodsFile
|
|
|
+ const newFujian = res.data.backupGoodsFile
|
|
|
+ if (oldFujian.length >= newFujian.length) {
|
|
|
+ let temp = ''
|
|
|
+ let temp2 = ''
|
|
|
+ oldFujian.forEach((v, i) => {
|
|
|
+ temp += v.name + ' / '
|
|
|
+ if (i <= newFujian.length - 1) temp2 += newFujian[i].name + ' / '
|
|
|
+ })
|
|
|
+ this.editData.push({ name: '附件信息', qian: temp, hou: temp2 })
|
|
|
+ } else {
|
|
|
+ let temp3 = ''
|
|
|
+ let temp4 = ''
|
|
|
+ newFujian.forEach((v2, i2) => {
|
|
|
+ temp3 += v2.name + ' / '
|
|
|
+ if (i2 <= oldFujian.length - 1) temp4 += oldFujian[i2].name + ' / '
|
|
|
+ })
|
|
|
+ this.editData.push({ name: '附件信息', qian: temp4, hou: temp3 })
|
|
|
+ }
|
|
|
+ // newFujian.forEach((v, i) => {
|
|
|
+ // if (v.type === 'video') v.type2 = '视频文件'
|
|
|
+ // if (v.type === 'img') v.type2 = '高清图片'
|
|
|
+ // if (v.type === 'audio') v.type2 = '音频文件'
|
|
|
+ // if (v.type === 'model') v.type2 = '三维模型'
|
|
|
+ // if (v.type === 'doc') v.type2 = '文档资料'
|
|
|
+ // if (oldFujian.length === 0) {
|
|
|
+ // this.editData.push({ name: v.type2, qian: '', hou: v.name })
|
|
|
+ // } else {
|
|
|
+ // oldFujian.forEach(v2 => {
|
|
|
+ // if (v.id !== v2.id && v.type === v2.type) {
|
|
|
+ // this.editData.push({ name: v.type2, qian: v2.name, hou: v2.name + ' , ' + v.name })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // console.log(999, oldFujian, newFujian)
|
|
|
+ // this.editData附件信息完全相同,直接删掉
|
|
|
+ if (this.editData[this.editData.length - 1].qian === this.editData[this.editData.length - 1].hou) this.editData.pop()
|
|
|
+ },
|
|
|
+ // 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted () {},
|
|
|
+ beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
+ beforeMount () {}, // 生命周期 - 挂载之前
|
|
|
+ beforeUpdate () {}, // 生命周期 - 更新之前
|
|
|
+ updated () {}, // 生命周期 - 更新之后
|
|
|
+ beforeDestroy () {}, // 生命周期 - 销毁之前
|
|
|
+ destroyed () {}, // 生命周期 - 销毁完成
|
|
|
+ activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang='less' scoped>
|
|
|
+//@import url(); 引入公共css类
|
|
|
+.holdingAdd {
|
|
|
+ /deep/#mytitle>span{
|
|
|
+ font-weight: 800;
|
|
|
+ }
|
|
|
+ display: flex;
|
|
|
+ .right {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .top {
|
|
|
+ padding-left: 35px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ box-shadow: 1px 1px 10px 1px;
|
|
|
+ margin-left: 2px;
|
|
|
+ height: 40px;
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .conten {
|
|
|
+ position: relative;
|
|
|
+ flex: 1;
|
|
|
+ background-color: #fff;
|
|
|
+ margin: 20px 20px 40px;
|
|
|
+ padding: 24px;
|
|
|
+ .con_top{
|
|
|
+ color: black;
|
|
|
+ height: 80px;
|
|
|
+ &>div {
|
|
|
+ float: left;
|
|
|
+ padding-left: 18px;
|
|
|
+ width: 50%;
|
|
|
+ height: 50%;
|
|
|
+ line-height: 40px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ &>span {
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .con_edit{
|
|
|
+ color: black;
|
|
|
+ margin: 24px 0;
|
|
|
+ max-height: 460px;
|
|
|
+ // background-color: cadetblue;
|
|
|
+ .title{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding:0 38px;
|
|
|
+ height: 50px;
|
|
|
+ font-weight: 700;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ }
|
|
|
+ .editChange{
|
|
|
+ font-weight: 700;
|
|
|
+ height: 40px;
|
|
|
+ display: flex;
|
|
|
+ &>div {
|
|
|
+ background-color: #fafafa;
|
|
|
+ padding-left: 18px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ height: 100%;
|
|
|
+ line-height: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .father{
|
|
|
+ max-height: 320px;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+ .con_txt{
|
|
|
+ display: flex;
|
|
|
+ &>div {
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ padding: 8px 0;
|
|
|
+ padding-left: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .button {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: 20px;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ width: 240px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|