公章管理

This commit is contained in:
fz
2023-11-17 17:53:03 +08:00
parent efde41565e
commit 293c5e76d0
6 changed files with 247 additions and 43 deletions
@@ -1,7 +1,7 @@
<template>
<div>
<el-dialog title="公章列表" :visible="sealVisable" @close="cancel" width="800px" center :distroy-on-close="true">
<el-table :data="dataList" style="width: 100%">
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
@@ -13,55 +13,61 @@
:show-overflow-tooltip="true"></el-table-column>
<el-table-column label="印章图片" align="center" prop="annexPath">
<template slot-scope="scope">
<!-- <el-image style="width: 40px; height: 40px;"
:src="imgUrl + scope.row.annexPath"
<el-image style="width: 40px; height: 40px;" :src="imgUrl + scope.row.annexPath"
:preview-src-list="srcList">
</el-image> -->
<span>{{ imgUrl + scope.row.annexPath }}</span>
</el-image>
<!-- <span>{{ imgUrl + scope.row.annexPath }}</span> -->
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="sealStatus">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.isUse == 1">已启用</el-tag>
<el-tag type="info" v-if="scope.row.isUse == 0">未启用</el-tag>
<el-tag type="info"
v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">未启用</el-tag>
<el-tag type="danger" v-if="scope.row.sealStatus == 0">审核中</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="DeptIndefiUrl(scope.row)" type="text" icon="el-icon-thumb"
v-if="scope.row.isUse == 0">启用</el-button>
<el-button size="mini" @click="DeptIndefiUrl(scope.row)" type="text" icon="el-icon-thumb"
v-if="scope.row.isUse == 1">禁用</el-button>
<el-button size="mini" @click="isUseChange(scope.row.id, 1)" type="text" icon="el-icon-thumb"
v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">启用</el-button>
<el-button size="mini" @click="isUseChange(scope.row.id, 0)" type="text" icon="el-icon-thumb"
v-if="scope.row.isUse == 1">禁用</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="sealListFn(queryParams)" />
</el-dialog>
</div>
</template>
<script>
import {
sealList
sealList,
updateSealLockStatus
} from "@/api/officialSeal/officialSeal.js";
export default {
props: ["sealVisable","sealData"],
props: ["sealVisable", "sealData"],
data() {
return {
loading: false,
srcList: ["https://img2.baidu.com/it/u=1814561676,2470063876&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500"],
queryParams: {
pageNum: 1,
pageSize: 10,
},
dataList: [
],
imgUrl:""
total: 0,
imgUrl: ""
};
},
watch: {
sealVisable(val) {
if (val) {
this.sealListFn({id:this.sealData.id})
// console.log(this.sealData,"LLLLLLLLLLLLLLLLL");
this.queryParams.id = this.sealData.id;
this.sealListFn(this.queryParams)
}
}
},
@@ -73,11 +79,33 @@ export default {
this.imgUrl = window.location.origin;
},
// 查询列表数据
sealListFn(data){
sealList(data).then(res=>{
sealListFn(data) {
this.loading = true;
sealList(data).then(res => {
this.dataList = res.rows;
this.total = res.total;
this.loading = false;
})
},
// 更新公章状态
updateSealLockStatusFn(data) {
updateSealLockStatus(data).then(res => {
this.$message.success('更新状态成功');
this.sealListFn(this.queryParams);
})
},
// 启用或者禁用公章
isUseChange(id, type) {
let params = {
id: id,
isUse: type
}
this.$modal
.confirm("是否更改状态")
.then((res) => {
this.updateSealLockStatusFn(params);
})
},
cancel() {
this.$emit("cancelSeal");
},