123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- <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="河段名称">
- <j-dict-select-tag placeholder="请选择河段名称" v-model="queryParam.hdmc" dictCode="hlmc"/>
- </a-form-item>
- </a-col>
- <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" v-has="'yhyc:add'" type="primary" icon="plus">新增</a-button>
- <a-button v-has="'yhyc:dc'" type="primary" icon="download" @click="handleExportXls('基本信息表')">导出</a-button>
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
- <a-button v-has="'yhyc:dr'" type="primary" icon="import">导入</a-button>
- </a-upload>
- <!-- 高级查询区域 -->
- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
- </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"
- class="j-table-force-nowrap"
- :scroll="{x:true}"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
- :customRow="clickThenSelect"
- @change="handleTableChange">
- <template slot="hdmc" slot-scope="text,record">
- <a @click="handleDetail(record)">{{ text }}</a>
- </template>
- <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="downloadFile(text)">
- 下载
- </a-button>
- </template>
- <span slot="action" slot-scope="text, record">
- <a-space>
- <a-button @click='handleEdit(record)' v-has="'yhyc:bj'" size='small' type='primary'>编辑</a-button>
- <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
- <a-button size='small' v-has="'yhyc:delete'" type='danger'>删除</a-button>
- </a-popconfirm>
- </a-space>
- <!-- <a-divider type="vertical" />-->
- <!-- <a-dropdown>-->
- <!-- <a class="ant-dropdown-link" v-has="'yhyc:delete'" type="primary" icon="plus">更多 <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>
- </a-table>
- </div>
- <a-tabs defaultActiveKey="1">
- <a-tab-pane tab="目标清单" key="1" >
- <RmMbqdList :mainId="selectedMainId" />
- </a-tab-pane>
- <a-tab-pane tab="问题清单" key="2" forceRender>
- <RmWtqdList :mainId="selectedMainId" />
- </a-tab-pane>
- <a-tab-pane tab="目标分解表" key="3" forceRender>
- <RmMbfjbList :mainId="selectedMainId" />
- </a-tab-pane>
- <a-tab-pane tab="任务清单" key="4" forceRender>
- <RmRwqdList :mainId="selectedMainId" />
- </a-tab-pane>
- <a-tab-pane tab="责任与措施清单" key="5" forceRender>
- <RmZrycsqdList :mainId="selectedMainId" />
- </a-tab-pane>
- </a-tabs>
- <rmJbxx-modal ref="modalForm" @ok="modalFormOk"></rmJbxx-modal>
- </a-card>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import RmJbxxModal from './modules/RmJbxxModal'
- import { getAction } from '@/api/manage'
- import RmMbqdList from './RmMbqdList'
- import RmWtqdList from './RmWtqdList'
- import RmMbfjbList from './RmMbfjbList'
- import RmRwqdList from './RmRwqdList'
- import RmZrycsqdList from './RmZrycsqdList'
- import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil'
- import '@/assets/less/TableExpand.less'
- export default {
- name: "RmJbxxList",
- mixins:[JeecgListMixin],
- components: {
- RmMbqdList,
- RmWtqdList,
- RmMbfjbList,
- RmRwqdList,
- RmZrycsqdList,
- RmJbxxModal
- },
- data () {
- return {
- description: '基本信息表管理页面',
- // 表头
- columns: [
- {
- title:'河段名称',
- align:"center",
- dataIndex: 'hdmc_dictText',
- scopedSlots: { customRender: 'hdmc' }
- },
- {
- title:'方案名称',
- align:"center",
- dataIndex: 'famc'
- },
- {
- title:'编制日期',
- align:"center",
- dataIndex: 'bzrq',
- customRender:function (text) {
- return !text?"":(text.length>10?text.substr(0,10):text)
- }
- },
- {
- title:'开始年月',
- align:"center",
- dataIndex: 'ksnf',
- customRender:function (text) {
- return !text?"":(text.length>10?text.substr(0,10):text)
- }
- },
- {
- title:'终止年月',
- align:"center",
- dataIndex: 'zznf',
- customRender:function (text) {
- return !text?"":(text.length>10?text.substr(0,10):text)
- }
- },
- {
- title:'编制单位',
- align:"center",
- dataIndex: 'bzdw'
- },
- {
- title:'备注',
- align:"center",
- dataIndex: 'bz'
- },
- {
- title:'文本方案',
- align:"center",
- dataIndex: 'wbfa',
- scopedSlots: {customRender: 'fileSlot'}
- },
- {
- title:'相关图件',
- align:"center",
- dataIndex: 'xgtj',
- scopedSlots: {customRender: 'imgSlot'}
- },
- {
- title: '操作',
- dataIndex: 'action',
- align:"center",
- fixed:"right",
- width:147,
- scopedSlots: { customRender: 'action' },
- }
- ],
- url: {
- list: "/hzz.yhyc/rmJbxx/list",
- delete: "/hzz.yhyc/rmJbxx/delete",
- deleteBatch: "/hzz.yhyc/rmJbxx/deleteBatch",
- exportXlsUrl: "/hzz.yhyc/rmJbxx/exportXls",
- importExcelUrl: "hzz.yhyc/rmJbxx/importExcel",
- },
- dictOptions:{
- hdmc:[],
- },
- /* 分页参数 */
- ipagination:{
- current: 1,
- pageSize: 5,
- pageSizeOptions: ['5', '10', '50'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 共" + total + "条"
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- selectedMainId:'',
- superFieldList:[],
- }
- },
- created() {
- this.getSuperFieldList();
- },
- computed: {
- importExcelUrl: function(){
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
- }
- },
- methods: {
- initDictConfig(){
- initDictOptions('hlmc').then((res) => {
- if (res.success) {
- this.$set(this.dictOptions, 'hdmc', res.result)
- }
- })
- },
- clickThenSelect(record) {
- return {
- on: {
- click: () => {
- this.onSelectChange(record.id.split(","), [record]);
- }
- }
- }
- },
- onClearSelected() {
- this.selectedRowKeys = [];
- this.selectionRows = [];
- this.selectedMainId=''
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- this.selectedMainId=selectedRowKeys[0]
- this.selectedRowKeys = selectedRowKeys;
- this.selectionRows = selectionRows;
- },
- loadData(arg) {
- if(!this.url.list){
- this.$message.error("请设置url.list属性!")
- return
- }
- //加载数据 若传入参数1则加载第一页的内容
- if (arg === 1) {
- this.ipagination.current = 1;
- }
- this.onClearSelected()
- var params = this.getQueryParams();//查询条件
- this.loading = true;
- getAction(this.url.list, params).then((res) => {
- if (res.success) {
- this.dataSource = res.result.records;
- this.ipagination.total = Number(res.result.total);
- }
- if(res.code===510){
- this.$message.warning(res.message)
- }
- this.loading = false;
- })
- },
- getSuperFieldList(){
- let fieldList=[];
- fieldList.push({type:'string',value:'hdmc',text:'河段名称',dictCode:'hlmc'})
- fieldList.push({type:'string',value:'famc',text:'方案名称',dictCode:''})
- fieldList.push({type:'date',value:'bzrq',text:'编制日期'})
- fieldList.push({type:'date',value:'ksnf',text:'开始年月'})
- fieldList.push({type:'date',value:'zznf',text:'终止年月'})
- fieldList.push({type:'string',value:'bzdw',text:'编制单位',dictCode:''})
- fieldList.push({type:'string',value:'bz',text:'备注',dictCode:''})
- fieldList.push({type:'string',value:'wbfa',text:'文本方案',dictCode:''})
- fieldList.push({type:'string',value:'xgtj',text:'相关图件',dictCode:''})
- this.superFieldList = fieldList
- }
- }
- }
- </script>
- <style scoped>
- @import '~@assets/less/common.less'
- </style>
|