资源管理1.1

This commit is contained in:
xbx 2023-11-19 20:32:19 +08:00
parent 00dc394dfc
commit 8291e41fd3
7 changed files with 608 additions and 637 deletions

View File

@ -6,7 +6,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="领用人"> <a-form-item label="领用人">
<j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient"/> <j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -24,14 +24,16 @@
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('家具信息表')">导出</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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button> <a-button type="primary" icon="import">导入</a-button>
</a-upload> </a-upload>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown> </a-dropdown>
@ -40,22 +42,14 @@
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <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> <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> <a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> </div>
<a-table <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
ref="table" :dataSource="dataSource" :pagination="ipagination" :loading="loading"
size="middle" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <template slot="htmlSlot" slot-scope="text">
@ -63,17 +57,12 @@
</template> </template>
<template slot="imgSlot" slot-scope="text,record"> <template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <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;"/> <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;" />
</template> </template>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载 下载
</a-button> </a-button>
</template> </template>
@ -106,149 +95,138 @@
<script> <script>
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RmsFurnitureModal from './modules/RmsFurnitureModal' import RmsFurnitureModal from './modules/RmsFurnitureModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
export default { export default {
name: 'RmsFurnitureList', name: 'RmsFurnitureList',
mixins:[JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: { components: {
RmsFurnitureModal RmsFurnitureModal
}, },
data () { data() {
return { return {
description: '家具信息表管理页面', description: '家具信息表管理页面',
// //
columns: [ columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{ {
title:'家具编号', title: '家具编号',
align:"center", align: "center",
dataIndex: 'furnitureNumber', dataIndex: 'furnitureNumber',
width:120, width: 120,
}, },
{ {
title:'家具名称', title: '家具名称',
align:"center", align: "center",
dataIndex: 'furnitureName', dataIndex: 'furnitureName',
width:120, width: 120,
}, },
{ {
title:'领用单位号', title: '领用单位号',
align:"center", align: "center",
dataIndex: 'collectingUnitNumber_dictText', dataIndex: 'collectingUnitNumber_dictText',
width:200 width: 200
}, },
{ {
title:'分类号', title: '分类号',
align:"center", align: "center",
dataIndex: 'categoryId', dataIndex: 'categoryId',
width:120, width: 120,
}, },
{ {
title:'型号', title: '型号',
align:"center", align: "center",
dataIndex: 'model', dataIndex: 'model',
width:80 width: 80
}, },
{ {
title:'规格', title: '规格',
align:"center", align: "center",
dataIndex: 'specifications', dataIndex: 'specifications',
width:80 width: 80
}, },
{ {
title:'数量', title: '数量',
align:"center", align: "center",
dataIndex: 'number', dataIndex: 'number',
width:80 width: 80
}, },
{ {
title:'单价', title: '单价',
align:"center", align: "center",
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
width:80 width: 80
}, },
{ {
title:'金额', title: '金额',
align:"center", align: "center",
dataIndex: 'amount', dataIndex: 'amount',
width:80 width: 80
}, },
{ {
title:'厂家', title: '厂家',
align:"center", align: "center",
dataIndex: 'manufactuer', dataIndex: 'manufactuer',
width:120 width: 120
}, },
{ {
title:'购置日期', title: '购置日期',
align:"center", align: "center",
dataIndex: 'purchaseDate', dataIndex: 'purchaseDate',
customRender:function (text) { customRender: function (text) {
return !text?"":(text.length>10?text.substr(0,10):text) return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
} }
}, },
{ {
title:'领用人', title: '领用人',
align:"center", align: "center",
dataIndex: 'recipient_dictText', dataIndex: 'recipient_dictText',
width:80 width: 80
}, },
{ {
title:'单据号', title: '单据号',
align:"center", align: "center",
dataIndex: 'documentNumber', dataIndex: 'documentNumber',
width:80 width: 80
}, },
{ {
title:'存放地id', title: '存放地址',
align:"center", align: "center",
dataIndex: 'locationId', dataIndex: 'locationName',
width:120 width: 120
}, },
{ {
title:'备注', title: '备注',
align:"center", align: "center",
dataIndex: 'note', dataIndex: 'note',
width:120 width: 120
}, },
{ {
title:'审核状态', title: '审核状态',
align:"center", align: "center",
dataIndex: 'approvalStatus_dictText', dataIndex: 'approvalStatus_dictText',
width:120 width: 120
}, },
{ {
title:'初审状态', title: '初审状态',
align:"center", align: "center",
dataIndex: 'initialAudit_dictText', dataIndex: 'initialAudit_dictText',
width:120 width: 120
}, },
{ {
title:'使用年限', title: '使用年限',
align:"center", align: "center",
dataIndex: 'usageYears' dataIndex: 'usageYears'
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
align:"center", align: "center",
fixed:"right", fixed: "right",
width:147, width: 147,
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
} }
], ],
@ -260,46 +238,46 @@
importExcelUrl: "rms/rmsFurniture/importExcel", importExcelUrl: "rms/rmsFurniture/importExcel",
}, },
dictOptions:{}, dictOptions: {},
superFieldList:[], superFieldList: [],
} }
}, },
created() { created() {
this.getSuperFieldList(); this.getSuperFieldList();
}, },
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}, },
}, },
methods: { methods: {
initDictConfig(){ initDictConfig() {
}, },
getSuperFieldList(){ getSuperFieldList() {
let fieldList=[]; let fieldList = [];
fieldList.push({type:'sel_depart',value:'collectingUnitNumber',text:'领用单位号'}) fieldList.push({ type: 'sel_depart', value: 'collectingUnitNumber', text: '领用单位号' })
fieldList.push({type:'string',value:'furnitureNumber',text:'家具编号',dictCode:''}) fieldList.push({ type: 'string', value: 'furnitureNumber', text: '家具编号', dictCode: '' })
fieldList.push({type:'string',value:'furnitureName',text:'家具名称',dictCode:''}) fieldList.push({ type: 'string', value: 'furnitureName', text: '家具名称', dictCode: '' })
fieldList.push({type:'string',value:'categoryId',text:'分类号',dictCode:''}) fieldList.push({ type: 'string', value: 'categoryId', text: '分类号', dictCode: '' })
fieldList.push({type:'string',value:'model',text:'型号',dictCode:''}) fieldList.push({ type: 'string', value: 'model', text: '型号', dictCode: '' })
fieldList.push({type:'string',value:'specifications',text:'规格',dictCode:''}) fieldList.push({ type: 'string', value: 'specifications', text: '规格', dictCode: '' })
fieldList.push({type:'string',value:'number',text:'数量',dictCode:''}) fieldList.push({ type: 'string', value: 'number', text: '数量', dictCode: '' })
fieldList.push({type:'string',value:'unitPrice',text:'单价',dictCode:''}) fieldList.push({ type: 'string', value: 'unitPrice', text: '单价', dictCode: '' })
fieldList.push({type:'string',value:'amount',text:'金额',dictCode:''}) fieldList.push({ type: 'string', value: 'amount', text: '金额', dictCode: '' })
fieldList.push({type:'string',value:'manufactuer',text:'厂家',dictCode:''}) fieldList.push({ type: 'string', value: 'manufactuer', text: '厂家', dictCode: '' })
fieldList.push({type:'date',value:'purchaseDate',text:'购置日期'}) fieldList.push({ type: 'date', value: 'purchaseDate', text: '购置日期' })
fieldList.push({type:'sel_user',value:'recipient',text:'领用人'}) fieldList.push({ type: 'sel_user', value: 'recipient', text: '领用人' })
fieldList.push({type:'string',value:'documentNumber',text:'单据号',dictCode:''}) fieldList.push({ type: 'string', value: 'documentNumber', text: '单据号', dictCode: '' })
fieldList.push({type:'string',value:'locationId',text:'存放地id',dictCode:''}) fieldList.push({ type: 'string', value: 'locationId', text: '存放地id', dictCode: '' })
fieldList.push({type:'string',value:'note',text:'备注',dictCode:''}) fieldList.push({ type: 'string', value: 'note', text: '备注', dictCode: '' })
fieldList.push({type:'string',value:'approvalStatus',text:'审核状态',dictCode:'approval_status'}) fieldList.push({ type: 'string', value: 'approvalStatus', text: '审核状态', dictCode: 'approval_status' })
fieldList.push({type:'string',value:'initialAudit',text:'初审状态',dictCode:'initial_audit'}) fieldList.push({ type: 'string', value: 'initialAudit', text: '初审状态', dictCode: 'initial_audit' })
fieldList.push({type:'string',value:'usageYears',text:'使用年限',dictCode:''}) fieldList.push({ type: 'string', value: 'usageYears', text: '使用年限', dictCode: '' })
this.superFieldList = fieldList this.superFieldList = fieldList
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>

View File

@ -10,47 +10,47 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="家具编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureNumber"> <a-form-model-item label="家具编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureNumber">
<a-input v-model="model.furnitureNumber" placeholder="请输入家具编号" ></a-input> <a-input v-model="model.furnitureNumber" placeholder="请输入家具编号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="家具名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureName"> <a-form-model-item label="家具名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureName">
<a-input v-model="model.furnitureName" placeholder="请输入家具名称" ></a-input> <a-input v-model="model.furnitureName" placeholder="请输入家具名称"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId"> <a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
<a-input v-model="model.categoryId" placeholder="请输入分类号" ></a-input> <a-input v-model="model.categoryId" placeholder="请输入分类号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="model"> <a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="model">
<a-input v-model="model.model" placeholder="请输入型号" ></a-input> <a-input v-model="model.model" placeholder="请输入型号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications"> <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格" ></a-input> <a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number"> <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
<a-input v-model="model.number" placeholder="请输入数量" ></a-input> <a-input v-model="model.number" placeholder="请输入数量"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice"> <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
<a-input v-model="model.unitPrice" placeholder="请输入单价" ></a-input> <a-input v-model="model.unitPrice" placeholder="请输入单价"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount"> <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
<a-input v-model="model.amount" placeholder="请输入金额" ></a-input> <a-input v-model="model.amount" placeholder="请输入金额"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufactuer"> <a-form-model-item label="厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufactuer">
<a-input v-model="model.manufactuer" placeholder="请输入厂家" ></a-input> <a-input v-model="model.manufactuer" placeholder="请输入厂家"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -65,32 +65,34 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber"> <a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber">
<a-input v-model="model.documentNumber" placeholder="请输入单据号" ></a-input> <a-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="存放地id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId"> <a-form-model-item label="存放地地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
<a-input v-model="model.locationId" placeholder="请输入存放地id" ></a-input> <a-cascader :options="treeData" placeholder="请选择父级存放地址" @change="onChange"></a-cascader>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note"> <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note">
<a-input v-model="model.note" placeholder="请输入备注" ></a-input> <a-input v-model="model.note" placeholder="请输入备注"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalStatus"> <a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalStatus">
<j-dict-select-tag type="radio" v-model="model.approvalStatus" dictCode="approval_status" placeholder="请选择审核状态" /> <j-dict-select-tag type="radio" v-model="model.approvalStatus" dictCode="approval_status"
placeholder="请选择审核状态" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="初审状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAudit"> <a-form-model-item label="初审状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAudit">
<j-dict-select-tag type="radio" v-model="model.initialAudit" dictCode="initial_audit" placeholder="请选择初审状态" /> <j-dict-select-tag type="radio" v-model="model.initialAudit" dictCode="initial_audit"
placeholder="请选择初审状态" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="使用年限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="usageYears"> <a-form-model-item label="使用年限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="usageYears">
<a-input v-model="model.usageYears" placeholder="请输入使用年限" ></a-input> <a-input v-model="model.usageYears" placeholder="请输入使用年限"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -101,10 +103,10 @@
<script> <script>
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
export default { export default {
name: 'RmsFurnitureForm', name: 'RmsFurnitureForm',
components: { components: {
}, },
@ -116,9 +118,9 @@
required: false required: false
} }
}, },
data () { data() {
return { return {
model:{ model: {
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -135,27 +137,40 @@
add: "/rms/rmsFurniture/add", add: "/rms/rmsFurniture/add",
edit: "/rms/rmsFurniture/edit", edit: "/rms/rmsFurniture/edit",
queryById: "/rms/rmsFurniture/queryById" queryById: "/rms/rmsFurniture/queryById"
} },
treeData: [],
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
} }
}, },
computed: { computed: {
formDisabled(){ formDisabled() {
return this.disabled return this.disabled
}, },
}, },
created () { created() {
//model //model
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getTreeData();
}, },
methods: { methods: {
add () { getTreeData() {
getAction(this.getTreeUrl, {}).then(res => {
if (res.success) {
this.treeData = res.result;
}
});
},
onChange(value) {
this.model.locationId = value[value.length - 1];
},
add() {
this.edit(this.modelDefault); this.edit(this.modelDefault);
}, },
edit (record) { edit(record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
this.visible = true; this.visible = true;
}, },
submitForm () { submitForm() {
const that = this; const that = this;
// //
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
@ -163,18 +178,18 @@
that.confirmLoading = true; that.confirmLoading = true;
let httpurl = ''; let httpurl = '';
let method = ''; let method = '';
if(!this.model.id){ if (!this.model.id) {
httpurl+=this.url.add; httpurl += this.url.add;
method = 'post'; method = 'post';
}else{ } else {
httpurl+=this.url.edit; httpurl += this.url.edit;
method = 'put'; method = 'put';
} }
httpAction(httpurl,this.model,method).then((res)=>{ httpAction(httpurl, this.model, method).then((res) => {
if(res.success){ if (res.success) {
that.$message.success(res.message); that.$message.success(res.message);
that.$emit('ok'); that.$emit('ok');
}else{ } else {
that.$message.warning(res.message); that.$message.warning(res.message);
} }
}).finally(() => { }).finally(() => {
@ -185,5 +200,5 @@
}) })
}, },
} }
} }
</script> </script>

View File

@ -6,7 +6,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="领用人"> <a-form-item label="领用人">
<j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient"/> <j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -24,14 +24,16 @@
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('仪器信息表')">导出</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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button> <a-button type="primary" icon="import">导入</a-button>
</a-upload> </a-upload>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown> </a-dropdown>
@ -40,22 +42,14 @@
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <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> <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> <a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> </div>
<a-table <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
ref="table" :dataSource="dataSource" :pagination="ipagination" :loading="loading"
size="middle" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <template slot="htmlSlot" slot-scope="text">
@ -63,17 +57,12 @@
</template> </template>
<template slot="imgSlot" slot-scope="text,record"> <template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <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;"/> <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;" />
</template> </template>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载 下载
</a-button> </a-button>
</template> </template>
@ -106,148 +95,132 @@
<script> <script>
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RmsInstrumentModal from './modules/RmsInstrumentModal' import RmsInstrumentModal from './modules/RmsInstrumentModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
export default { export default {
name: 'RmsInstrumentList', name: 'RmsInstrumentList',
mixins:[JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: { components: {
RmsInstrumentModal RmsInstrumentModal
}, },
data () { data() {
return { return {
description: '仪器信息表管理页面', description: '仪器信息表管理页面',
// //
columns: [ columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{ {
title:'ID', title: '仪器编号',
align:"center", align: "center",
dataIndex: 'instrumentId',
width:80
},
{
title:'仪器编号',
align:"center",
dataIndex: 'instrumentNumber', dataIndex: 'instrumentNumber',
width:120 width: 120
}, },
{ {
title:'仪器名称', title: '仪器名称',
align:"center", align: "center",
dataIndex: 'instrumentName', dataIndex: 'instrumentName',
width:120 width: 120
}, },
{ {
title:'领用单位号', title: '领用单位号',
align:"center", align: "center",
dataIndex: 'collectingUnitNumber_dictText', dataIndex: 'collectingUnitNumber_dictText',
width:200 width: 200
}, },
{ {
title:'分类号', title: '分类号',
align:"center", align: "center",
dataIndex: 'categoryId', dataIndex: 'categoryId',
width:120 width: 120
}, },
{ {
title:'型号', title: '型号',
align:"center", align: "center",
dataIndex: 'model', dataIndex: 'model',
width:120 width: 120
}, },
{ {
title:'规格', title: '规格',
align:"center", align: "center",
dataIndex: 'specifications', dataIndex: 'specifications',
width:120 width: 120
}, },
{ {
title:'单价', title: '单价',
align:"center", align: "center",
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
width:120 width: 120
}, },
{ {
title:'厂家', title: '厂家',
align:"center", align: "center",
dataIndex: 'manufactuer', dataIndex: 'manufactuer',
width:200 width: 200
}, },
{ {
title:'购置日期', title: '购置日期',
align:"center", align: "center",
dataIndex: 'purchasedate', dataIndex: 'purchasedate',
customRender:function (text) { customRender: function (text) {
return !text?"":(text.length>10?text.substr(0,10):text) return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
}, },
width:120 width: 120
}, },
{ {
title:'领用人', title: '领用人',
align:"center", align: "center",
dataIndex: 'recipient_dictText', dataIndex: 'recipient_dictText',
width:80 width: 80
}, },
{ {
title:'入库时间', title: '入库时间',
align:"center", align: "center",
dataIndex: 'entryDate', dataIndex: 'entryDate',
customRender:function (text) { customRender: function (text) {
return !text?"":(text.length>10?text.substr(0,10):text) return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
}, },
width:80 width: 80
}, },
{ {
title:'单据号', title: '单据号',
align:"center", align: "center",
dataIndex: 'documentNumber' dataIndex: 'documentNumber'
}, },
{ {
title:'存放地id', title: '存放地址',
align:"center", align: "center",
dataIndex: 'locationId', dataIndex: 'locationName',
width:120 width: 120
}, },
{ {
title:'备注', title: '备注',
align:"center", align: "center",
dataIndex: 'note', dataIndex: 'note',
width:120 width: 120
}, },
{ {
title:'审核状态', title: '审核状态',
align:"center", align: "center",
dataIndex: 'approvalStatus_dictText', dataIndex: 'approvalStatus_dictText',
width:120 width: 120
}, },
{ {
title:'初审状态', title: '初审状态',
align:"center", align: "center",
dataIndex: 'initialAudit_dictText', dataIndex: 'initialAudit_dictText',
width:120 width: 120
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
align:"center", align: "center",
fixed:"right", fixed: "right",
width:147, width: 147,
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
} }
], ],
@ -259,45 +232,45 @@
importExcelUrl: "rms/rmsInstrument/importExcel", importExcelUrl: "rms/rmsInstrument/importExcel",
}, },
dictOptions:{}, dictOptions: {},
superFieldList:[], superFieldList: [],
} }
}, },
created() { created() {
this.getSuperFieldList(); this.getSuperFieldList();
}, },
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}, },
}, },
methods: { methods: {
initDictConfig(){ initDictConfig() {
}, },
getSuperFieldList(){ getSuperFieldList() {
let fieldList=[]; let fieldList = [];
fieldList.push({type:'sel_depart',value:'collectingUnitNumber',text:'领用单位号'}) fieldList.push({ type: 'sel_depart', value: 'collectingUnitNumber', text: '领用单位号' })
fieldList.push({type:'string',value:'instrumentNumber',text:'仪器编号',dictCode:''}) fieldList.push({ type: 'string', value: 'instrumentNumber', text: '仪器编号', dictCode: '' })
fieldList.push({type:'string',value:'instrumentName',text:'仪器名称',dictCode:''}) fieldList.push({ type: 'string', value: 'instrumentName', text: '仪器名称', dictCode: '' })
fieldList.push({type:'string',value:'categoryId',text:'分类号',dictCode:''}) fieldList.push({ type: 'string', value: 'categoryId', text: '分类号', dictCode: '' })
fieldList.push({type:'string',value:'model',text:'型号',dictCode:''}) fieldList.push({ type: 'string', value: 'model', text: '型号', dictCode: '' })
fieldList.push({type:'string',value:'specifications',text:'规格',dictCode:''}) fieldList.push({ type: 'string', value: 'specifications', text: '规格', dictCode: '' })
fieldList.push({type:'string',value:'unitPrice',text:'单价',dictCode:''}) fieldList.push({ type: 'string', value: 'unitPrice', text: '单价', dictCode: '' })
fieldList.push({type:'string',value:'manufactuer',text:'厂家',dictCode:''}) fieldList.push({ type: 'string', value: 'manufactuer', text: '厂家', dictCode: '' })
fieldList.push({type:'date',value:'purchasedate',text:'购置日期'}) fieldList.push({ type: 'date', value: 'purchasedate', text: '购置日期' })
fieldList.push({type:'sel_user',value:'recipient',text:'领用人'}) fieldList.push({ type: 'sel_user', value: 'recipient', text: '领用人' })
fieldList.push({type:'date',value:'entryDate',text:'入库时间'}) fieldList.push({ type: 'date', value: 'entryDate', text: '入库时间' })
fieldList.push({type:'string',value:'documentNumber',text:'单据号',dictCode:''}) fieldList.push({ type: 'string', value: 'documentNumber', text: '单据号', dictCode: '' })
fieldList.push({type:'string',value:'locationId',text:'存放地id',dictCode:''}) fieldList.push({ type: 'string', value: 'locationId', text: '存放地id', dictCode: '' })
fieldList.push({type:'string',value:'note',text:'备注',dictCode:''}) fieldList.push({ type: 'string', value: 'note', text: '备注', dictCode: '' })
fieldList.push({type:'string',value:'approvalStatus',text:'审核状态',dictCode:'approval_status'}) fieldList.push({ type: 'string', value: 'approvalStatus', text: '审核状态', dictCode: 'approval_status' })
fieldList.push({type:'string',value:'initialAudit',text:'初审状态',dictCode:'initial_audit'}) fieldList.push({ type: 'string', value: 'initialAudit', text: '初审状态', dictCode: 'initial_audit' })
fieldList.push({type:'string',value:'instrumentId',text:'ID',dictCode:''}) fieldList.push({ type: 'string', value: 'instrumentId', text: 'ID', dictCode: '' })
this.superFieldList = fieldList this.superFieldList = fieldList
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>

View File

@ -10,37 +10,37 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="仪器编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentNumber"> <a-form-model-item label="仪器编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentNumber">
<a-input v-model="model.instrumentNumber" placeholder="请输入仪器编号" ></a-input> <a-input v-model="model.instrumentNumber" placeholder="请输入仪器编号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="仪器名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentName"> <a-form-model-item label="仪器名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentName">
<a-input v-model="model.instrumentName" placeholder="请输入仪器名称" ></a-input> <a-input v-model="model.instrumentName" placeholder="请输入仪器名称"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId"> <a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
<a-input v-model="model.categoryId" placeholder="请输入分类号" ></a-input> <a-input v-model="model.categoryId" placeholder="请输入分类号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="model"> <a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="model">
<a-input v-model="model.model" placeholder="请输入型号" ></a-input> <a-input v-model="model.model" placeholder="请输入型号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications"> <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格" ></a-input> <a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice"> <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
<a-input v-model="model.unitPrice" placeholder="请输入单价" ></a-input> <a-input v-model="model.unitPrice" placeholder="请输入单价"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufactuer"> <a-form-model-item label="厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufactuer">
<a-input v-model="model.manufactuer" placeholder="请输入厂家" ></a-input> <a-input v-model="model.manufactuer" placeholder="请输入厂家"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -60,32 +60,29 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber"> <a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber">
<a-input v-model="model.documentNumber" placeholder="请输入单据号" ></a-input> <a-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="存放地id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId"> <a-form-model-item label="存放地地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
<a-input v-model="model.locationId" placeholder="请输入存放地id" ></a-input> <a-cascader :options="treeData" placeholder="请选择父级存放地址" @change="onChange"></a-cascader>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note"> <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note">
<a-input v-model="model.note" placeholder="请输入备注" ></a-input> <a-input v-model="model.note" placeholder="请输入备注"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalStatus"> <a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalStatus">
<j-dict-select-tag type="radio" v-model="model.approvalStatus" dictCode="approval_status" placeholder="请选择审核状态" /> <j-dict-select-tag type="radio" v-model="model.approvalStatus" dictCode="approval_status"
placeholder="请选择审核状态" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="初审状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAudit"> <a-form-model-item label="初审状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAudit">
<j-dict-select-tag type="radio" v-model="model.initialAudit" dictCode="initial_audit" placeholder="请选择初审状态" /> <j-dict-select-tag type="radio" v-model="model.initialAudit" dictCode="initial_audit"
</a-form-model-item> placeholder="请选择初审状态" />
</a-col>
<a-col :span="12">
<a-form-model-item label="ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentId">
<a-input v-model="model.instrumentId" placeholder="请输入ID" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -96,10 +93,10 @@
<script> <script>
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
export default { export default {
name: 'RmsInstrumentForm', name: 'RmsInstrumentForm',
components: { components: {
}, },
@ -111,9 +108,9 @@
required: false required: false
} }
}, },
data () { data() {
return { return {
model:{ model: {
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -130,27 +127,40 @@
add: "/rms/rmsInstrument/add", add: "/rms/rmsInstrument/add",
edit: "/rms/rmsInstrument/edit", edit: "/rms/rmsInstrument/edit",
queryById: "/rms/rmsInstrument/queryById" queryById: "/rms/rmsInstrument/queryById"
} },
treeData: [],
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
} }
}, },
computed: { computed: {
formDisabled(){ formDisabled() {
return this.disabled return this.disabled
}, },
}, },
created () { created() {
//model //model
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getTreeData();
}, },
methods: { methods: {
add () { getTreeData() {
getAction(this.getTreeUrl, {}).then(res => {
if (res.success) {
this.treeData = res.result;
}
});
},
onChange(value) {
this.model.locationId = value[value.length - 1];
},
add() {
this.edit(this.modelDefault); this.edit(this.modelDefault);
}, },
edit (record) { edit(record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
this.visible = true; this.visible = true;
}, },
submitForm () { submitForm() {
const that = this; const that = this;
// //
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
@ -158,18 +168,18 @@
that.confirmLoading = true; that.confirmLoading = true;
let httpurl = ''; let httpurl = '';
let method = ''; let method = '';
if(!this.model.id){ if (!this.model.id) {
httpurl+=this.url.add; httpurl += this.url.add;
method = 'post'; method = 'post';
}else{ } else {
httpurl+=this.url.edit; httpurl += this.url.edit;
method = 'put'; method = 'put';
} }
httpAction(httpurl,this.model,method).then((res)=>{ httpAction(httpurl, this.model, method).then((res) => {
if(res.success){ if (res.success) {
that.$message.success(res.message); that.$message.success(res.message);
that.$emit('ok'); that.$emit('ok');
}else{ } else {
that.$message.warning(res.message); that.$message.warning(res.message);
} }
}).finally(() => { }).finally(() => {
@ -180,5 +190,5 @@
}) })
}, },
} }
} }
</script> </script>

View File

@ -72,11 +72,6 @@ export default {
align: "center", align: "center",
dataIndex: 'sortNumber' dataIndex: 'sortNumber'
}, },
{
title: '父级存放地址',
align: "center",
dataIndex: 'parentLocationId'
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -109,7 +104,7 @@ export default {
selectedRowKeys = selectedRowKeys.join(',') selectedRowKeys = selectedRowKeys.join(',')
console.log(selectedRowKeys) console.log(selectedRowKeys)
this.queryParam.id = selectedRowKeys this.queryParam.id = selectedRowKeys
this.loadData() this.loadData(1)
}, },
modalFormOk() { modalFormOk() {
this.$refs.locationaTree.getTreeData() this.$refs.locationaTree.getTreeData()

View File

@ -63,7 +63,7 @@ export default {
queryById: "/rms/rmsLocation/queryById" queryById: "/rms/rmsLocation/queryById"
}, },
treeData: [], treeData: [],
getTreeUrl: '/rms/rmsLocation/getCascader' getTreeUrl: '/rms/rmsLocation/getCascader?type=0'
} }
}, },
computed: { computed: {

View File

@ -69,16 +69,16 @@ export default {
// //
this.$emit('onSelect', childKeys); this.$emit('onSelect', childKeys);
}, },
//key
collectChildKeys(node, keys = []) { collectChildKeys(node, keys = []) {
if (!node) { if (!node) {
return keys; return keys;
} }
// children // childrenkey
if (node.children && node.children.length > 0) { if (node.children) {
node.children.forEach(child => { for (let child of node.children) {
keys.push(child.key); keys.push(child.key);
this.collectChildKeys(child, keys); }
});
} }
return keys; return keys;
}, },