From 445cfc2c5cee3d8fc0f8f1ffae5b66d9c761e681 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期三, 22 十一月 2023 19:15:39 +0800 Subject: [PATCH] Merge branch 'develop' --- src/views/eam/ABC/StreamList.vue | 345 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 345 insertions(+), 0 deletions(-) diff --git a/src/views/eam/ABC/StreamList.vue b/src/views/eam/ABC/StreamList.vue new file mode 100644 index 0000000..974f945 --- /dev/null +++ b/src/views/eam/ABC/StreamList.vue @@ -0,0 +1,345 @@ +<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 + :span="6" + > + <a-form-item + :labelCol="labelCol" + :wrapperCol="wrapperCol" + label="鍗曟嵁鍙�" + > + <a-input + placeholder="璇疯緭鍏ュ崟鎹彿鏌ヨ" + v-model="queryParam.num" + ></a-input> + </a-form-item> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + @click="searchReset" + icon="reload" + >閲嶇疆</a-button> + <a-button @click="handleAdd" type="primary" icon="plus" v-if="nodeSort===1">鏂板</a-button> + <!-- <a-button type="primary" icon="download" @click="handleExportXls('璁惧ABC璇勪环')">瀵煎嚭</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> --> + <!-- 楂樼骇鏌ヨ鍖哄煙 --> + <!-- <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="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text,record"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> + <img v-else :src="getImgView(text)" :preview="record.id" 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"> + <div v-if="nodeValue===record.status"> + <a @click="handleStreamNext(record)" :disabled="nodeSort===1&&nodeValue!==record.status" >{{button1.name}}</a> + <a-divider type="vertical" /> + <a @click="handleStreamLast(record)" :disabled="nodeSort===1" >{{button2.name}}</a> + </div> + <div v-if="nodeSort===1&&nodeValue===record.status"> + <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-item> + <a @click="handleEdit(record)">缂栬緫</a> + </a-menu-item> + </a-menu> + </a-dropdown> + </div> + </span> + + </a-table> + </div> + + <a-tabs defaultActiveKey="1"> + <a-tab-pane tab="鎿嶄綔璁板綍" key="1" > + <StreamOperationList :mainId="streamOperationMainId" /> + </a-tab-pane> + <a-tab-pane tab="ABC璇勫垎" key="2" forceRender> + <ABCAssessmentList :mainId="aBCAssessmentMainId" /> + </a-tab-pane> + </a-tabs> + + <stream-modal ref="modalForm" @ok="modalFormOk"></stream-modal> + <node-model ref="nodeModel" @ok="modalFormOk"></node-model> + </a-card> +</template> + +<script> + + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import StreamModal from './modules/StreamModal' + import { getAction } from '@/api/manage' + import StreamOperationList from './StreamOperationList' + import ABCAssessmentList from './ABCAssessmentList' + import '@/assets/less/TableExpand.less' + import NodeModel from './modules/NodeModel.vue' + + + export default { + name: "StreamList", + mixins:[JeecgListMixin], + components: { + StreamOperationList, + ABCAssessmentList, + StreamModal, + NodeModel + }, + data () { + return { + description: '璁惧ABC璇勪环绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'鍗曟嵁鍙�', + align:"center", + dataIndex: 'num', + width:400 + }, + { + title:'褰撳墠鑺傜偣', + align:"center", + dataIndex: 'status_dictText', + width:300 + }, + { + title:'鍗曟嵁绫诲瀷', + align:"center", + dataIndex: 'type_dictText', + width:300 + }, + { + title:'鍙戣捣鏃堕棿', + align:"center", + dataIndex: 'createTime', + width:300 + }, + { + title:'鍙戣捣浜�', + align:"center", + dataIndex: 'createBy_dictText' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:200, + scopedSlots: { customRender: 'action' }, + } + ], + url: { + list: "/eam/stream/list", + delete: "/eam/stream/delete", + deleteBatch: "/eam/stream/deleteBatch", + exportXlsUrl: "/eam/stream/exportXls", + importExcelUrl: "eam/stream/importExcel", + getPreInfo:"eam/stream/getPreInfo" + }, + dictOptions:{ + }, + /* 鍒嗛〉鍙傛暟 */ + 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:[], + streamOperationMainId: '', + aBCAssessmentMainId: '', + button1:{}, + button2:{}, + nodeSort:0, + nodeValue:'' + } + }, + created() { + this.getSuperFieldList(); + }, + mounted(){ + this.getPreInfo(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + initDictConfig(){ + }, + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); + } + } + } + }, + handleStreamNext(record){ + var step = { + name:this.button1.name, + value:this.button1.value, + opType:'next', + nodeSort:this.nodeSort, + node:this.nodeValue, + streamId:record.id + } + this.$refs.nodeModel.title = this.button1.name+"鎿嶄綔"; + this.$refs.nodeModel.edit(step); + }, + handleStreamLast(record){ + var step = { + name:this.button2.name, + value:this.button2.value, + opType:'last', + nodeSort:this.nodeSort, + node:this.nodeValue, + streamId:record.id + } + this.$refs.nodeModel.title = this.button2.name+"鎿嶄綔"; + this.$refs.nodeModel.edit(step); + }, + onClearSelected() { + this.selectedRowKeys = []; + this.selectionRows = []; + this.selectedMainId='' + }, + onSelectChange(selectedRowKeys, selectionRows) { + if(selectedRowKeys.length===1){ + this.selectedMainId=selectedRowKeys[0] + this.streamOperationMainId = selectionRows[0]['id'] + this.aBCAssessmentMainId = selectionRows[0]['id'] + }else{ + this.selectedMainId='' + this.streamOperationMainId = '' + this.aBCAssessmentMainId = '' + } + + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + + }, + loadData(arg) { + if(!this.url.list){ + this.$message.error("璇疯缃畊rl.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 = res.result.total; + } + if(res.code===510){ + this.$message.warning(res.message) + } + this.loading = false; + }) + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'num',text:'num',dictCode:''}) + fieldList.push({type:'string',value:'status',text:'status',dictCode:''}) + fieldList.push({type:'string',value:'type',text:'鍗曟嵁绫诲瀷',dictCode:''}) + this.superFieldList = fieldList + }, + getPreInfo(){ + getAction(this.url.getPreInfo).then(res=>{ + if(res.result.msg==='ok'){ + this.button1 = res.result.buttons[0]; + this.button2 = res.result.buttons[1]; + this.nodeSort = res.result.nodeSort; + this.nodeValue = res.result.nodeValue; + } + }) + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less' +</style> \ No newline at end of file -- Gitblit v1.9.3