|
@@ -0,0 +1,330 @@
|
|
|
+<template>
|
|
|
+ <a-card :bordered="false">
|
|
|
+ <!-- 查询区域 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="印章类别">
|
|
|
+ <a-input placeholder="请输入印章类别" v-model="queryParam.sealType"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="印章名称">
|
|
|
+ <a-input placeholder="请输入印章名称" v-model="queryParam.sealName"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <template v-if="toggleSearchStatus">
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="印章材质">
|
|
|
+ <a-input placeholder="请输入印章材质" v-model="queryParam.sealMaterial"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="印章尺寸">
|
|
|
+ <a-input placeholder="请输入印章尺寸" v-model="queryParam.sealSize"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="印章状态">
|
|
|
+ <a-input placeholder="请输入印章状态" v-model="queryParam.sealStatus"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="印章保管人">
|
|
|
+ <a-input placeholder="请输入印章保管人" v-model="queryParam.sealCustodian"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="保管部门">
|
|
|
+ <a-input placeholder="请输入保管部门" v-model="queryParam.custodianDept"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </template>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
|
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
|
|
+ <a @click="handleToggleSearch" style="margin-left: 8px">
|
|
|
+ {{ toggleSearchStatus ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 查询区域-END -->
|
|
|
+
|
|
|
+ <!-- 操作按钮区域 -->
|
|
|
+ <div class="table-operator">
|
|
|
+<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
|
|
|
+<!-- <a-button type="primary" icon="download" @click="handleExportXls('印章档案')">导出</a-button>-->
|
|
|
+<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
|
|
+<!-- <a-button type="primary" icon="import">导入</a-button>-->
|
|
|
+<!-- </a-upload>-->
|
|
|
+<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
|
|
|
+<!-- <a-menu slot="overlay">-->
|
|
|
+<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
|
|
|
+<!-- </a-menu>-->
|
|
|
+<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
|
|
|
+<!-- </a-dropdown>-->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- table区域-begin -->
|
|
|
+ <div>
|
|
|
+ <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
|
+ <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
|
+ <a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a-table
|
|
|
+ ref="table"
|
|
|
+ size="middle"
|
|
|
+ bordered
|
|
|
+ rowKey="id"
|
|
|
+ :columns="columns"
|
|
|
+ :dataSource="dataSource"
|
|
|
+ :pagination="ipagination"
|
|
|
+ :loading="loading"
|
|
|
+ :rowSelection="{fixed:true,selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
+
|
|
|
+ @change="handleTableChange">
|
|
|
+
|
|
|
+ <template slot="htmlSlot" slot-scope="text">
|
|
|
+ <div v-html="text"></div>
|
|
|
+ </template>
|
|
|
+ <template slot="imgSlot" slot-scope="text">
|
|
|
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">无此图片</span>
|
|
|
+ <img v-else :src="getImgView(text)" height="25px" alt="图片不存在" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
|
|
+ </template>
|
|
|
+ <template slot="fileSlot" slot-scope="text">
|
|
|
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">无此文件</span>
|
|
|
+ <a-button
|
|
|
+ v-else
|
|
|
+ :ghost="true"
|
|
|
+ type="primary"
|
|
|
+ icon="download"
|
|
|
+ size="small"
|
|
|
+ @click="uploadFile(text)">
|
|
|
+ 下载
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <span slot="action" slot-scope="text, record">
|
|
|
+ <a @click="handleEdit(record)">编辑</a>
|
|
|
+
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a-dropdown>
|
|
|
+ <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
|
|
+ <a-menu slot="overlay">
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
|
+ <a>删除</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+ </a-dropdown>
|
|
|
+ </span>
|
|
|
+
|
|
|
+
|
|
|
+ <span slot="status" slot-scope="text, record">
|
|
|
+ <a @click="changeStatus(record)">{{record.sealStatus}}</a>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ <a-modal
|
|
|
+ :visible='visible'
|
|
|
+ :width="100"
|
|
|
+ cancelText='关闭'
|
|
|
+ title='更改状态'
|
|
|
+ @ok="ok"
|
|
|
+ @cancel="cancel">
|
|
|
+ <a-form :form="form">
|
|
|
+ <a-form-item label="印章状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
+ <a-select placeholder="请选择印章状态" v-decorator="[ 'sealStatus']" >
|
|
|
+ <a-select-option value="正在使用">正在使用</a-select-option>
|
|
|
+ <a-select-option value="已销毁">已销毁</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-form>
|
|
|
+ </a-modal>
|
|
|
+ <sealArchives-modal ref="modalForm" @ok="modalFormOk"></sealArchives-modal>
|
|
|
+ </a-card>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+
|
|
|
+ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
+ import SealArchivesModal from './modules/SealArchivesModal'
|
|
|
+ import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
|
|
|
+ import { httpAction } from '@api/manage'
|
|
|
+ import pick from 'lodash.pick'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "SealArchivesList",
|
|
|
+ mixins:[JeecgListMixin],
|
|
|
+ components: {
|
|
|
+ JDictSelectTag,
|
|
|
+ SealArchivesModal
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ form: this.$form.createForm(this),
|
|
|
+ visible: false,
|
|
|
+ description: '印章档案管理页面',
|
|
|
+ labelCol: {
|
|
|
+ xs: { span: 24 },
|
|
|
+ sm: { span: 5 },
|
|
|
+ },
|
|
|
+ wrapperCol: {
|
|
|
+ xs: { span: 24 },
|
|
|
+ sm: { span: 16 },
|
|
|
+ },
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '#',
|
|
|
+ dataIndex: '',
|
|
|
+ key:'rowIndex',
|
|
|
+ width:60,
|
|
|
+ align:"center",
|
|
|
+ customRender:function (t,r,index) {
|
|
|
+ return parseInt(index)+1;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'印章类别',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'sealType'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'印章名称',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'sealName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'印章材质',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'sealMaterial'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'印章尺寸',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'sealSize'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'印章状态',
|
|
|
+ align:"center",
|
|
|
+ scopedSlots: { customRender: 'status' },
|
|
|
+ dataIndex: 'sealStatus'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'印章保管人',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'sealCustodian'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'保管部门',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'custodianDept'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'刻章日期',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'engravingDate'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'销毁日期',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'destroyDate',
|
|
|
+ customRender:function (text) {
|
|
|
+ return !text?"":(text.length>10?text.substr(0,10):text)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'上缴日期',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'turnDate',
|
|
|
+ customRender:function (text) {
|
|
|
+ return !text?"":(text.length>10?text.substr(0,10):text)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'附件',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'file',
|
|
|
+ scopedSlots: {customRender: 'fileSlot'},
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // title: '操作',
|
|
|
+ // dataIndex: 'action',
|
|
|
+ // align:"center",
|
|
|
+ // scopedSlots: { customRender: 'action' }
|
|
|
+ // }
|
|
|
+ ],
|
|
|
+ url: {
|
|
|
+ list: "/sealArchives/sealArchives/list",
|
|
|
+ delete: "/sealArchives/sealArchives/delete",
|
|
|
+ deleteBatch: "/sealArchives/sealArchives/deleteBatch",
|
|
|
+ exportXlsUrl: "/sealArchives/sealArchives/exportXls",
|
|
|
+ importExcelUrl: "sealArchives/sealArchives/importExcel",
|
|
|
+ edit: "/sealArchives/sealArchives/edit",
|
|
|
+ },
|
|
|
+ dictOptions:{},
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ importExcelUrl: function(){
|
|
|
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initDictConfig(){
|
|
|
+ },
|
|
|
+ changeStatus(record){
|
|
|
+ console.log(record);
|
|
|
+ this.form.resetFields();
|
|
|
+ this.visible = true;
|
|
|
+ this.model = Object.assign({}, record);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.form.setFieldsValue(pick(this.model,'sealStatus'))
|
|
|
+ })
|
|
|
+ },
|
|
|
+ ok(){
|
|
|
+ const that = this;
|
|
|
+ // 触发表单验证
|
|
|
+ this.form.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ that.confirmLoading = true;
|
|
|
+ let httpurl = '';
|
|
|
+ let method = '';
|
|
|
+ httpurl+=this.url.edit;
|
|
|
+ method = 'put';
|
|
|
+ let formData = Object.assign(this.model, values);
|
|
|
+ console.log("表单提交数据",formData)
|
|
|
+ httpAction(httpurl,formData,method).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success(res.message);
|
|
|
+ that.$emit('ok');
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.visible = false;
|
|
|
+ this.loadData()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancel(){
|
|
|
+ this.visible = false;
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+ @import '~@assets/less/common.less';
|
|
|
+</style>
|