commit
075c4aba02
19 changed files with 481 additions and 121 deletions
@ -0,0 +1,203 @@ |
||||
<template> |
||||
<j-modal |
||||
:width="width" |
||||
:visible="visible" |
||||
:title="title" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
@cancel="handleCancel" |
||||
style="top:50px" |
||||
cancelText="关闭" |
||||
> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
</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" |
||||
:scroll="{x:true}" |
||||
bordered |
||||
rowKey="id" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{ type: 'radio',selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||
class="j-table-force-nowrap" |
||||
@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="downloadFile(text)"> |
||||
下载 |
||||
</a-button> |
||||
</template> |
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="handleDetail(record)">详情</a> |
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
</a-card> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
|
||||
export default { |
||||
name: 'JSelectProductionDep', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
|
||||
}, |
||||
data () { |
||||
return { |
||||
description: '生产部门管理页面', |
||||
title:'', |
||||
width:1200, |
||||
visible: false, |
||||
disableSubmit: false, |
||||
orderId:'', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '序号', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'生产企业名称', |
||||
align:"center", |
||||
dataIndex: 'departName' |
||||
}, |
||||
{ |
||||
title:'部门编码', |
||||
align:"center", |
||||
dataIndex: 'orgCode' |
||||
}, |
||||
{ |
||||
title:'手机号', |
||||
align:"center", |
||||
dataIndex: 'mobile' |
||||
}, |
||||
{ |
||||
title:'地址', |
||||
align:"center", |
||||
dataIndex: 'address' |
||||
}, |
||||
// { |
||||
// title: '操作', |
||||
// dataIndex: 'action', |
||||
// align:"center", |
||||
// fixed:"right", |
||||
// width:147, |
||||
// scopedSlots: { customRender: 'action' } |
||||
// } |
||||
], |
||||
url: { |
||||
list: "/workOrder/workOrder/JSelectPDList", |
||||
delete: "", |
||||
deleteBatch: "", |
||||
exportXlsUrl: "", |
||||
importExcelUrl: "", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
selectedRowKeys: [], |
||||
selectdepRows: [], |
||||
selectdepIds: [], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig(){ |
||||
}, |
||||
showModal(orderId) { |
||||
this.selectedRowKeys=[] |
||||
this.orderId=orderId |
||||
this.visible = true; |
||||
this.loadData(); |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$emit('ok', this.orderId,this.selectedRowKeys[0]); |
||||
// console.log("selectedRowKeys"+this.selectedRowKeys); |
||||
// console.log("selectdepIds"+this.selectdepIds); |
||||
this.visible = false; |
||||
}, |
||||
|
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
}, |
||||
onSelectChange(selectedRowKeys, selectionRows) { |
||||
this.selectedRowKeys = selectedRowKeys; |
||||
this.selectionRows = selectionRows; |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'productCode',text:'产品编号',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
Loading…
Reference in new issue