资源管理1.1
This commit is contained in:
parent
00dc394dfc
commit
8291e41fd3
|
@ -24,11 +24,13 @@
|
|||
<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-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>
|
||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
|
||||
@handleSuperQuery="handleSuperQuery"></j-super-query>
|
||||
<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>
|
||||
|
@ -40,22 +42,14 @@
|
|||
<!-- 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>项
|
||||
<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="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
class="j-table-force-nowrap"
|
||||
<a-table ref="table" size="middle" :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">
|
||||
|
||||
<template slot="htmlSlot" slot-scope="text">
|
||||
|
@ -63,17 +57,12 @@
|
|||
</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;"/>
|
||||
<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 v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
|
||||
下载
|
||||
</a-button>
|
||||
</template>
|
||||
|
@ -123,16 +112,6 @@
|
|||
description: '家具信息表管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
// {
|
||||
// title: '#',
|
||||
// dataIndex: '',
|
||||
// key:'rowIndex',
|
||||
// width:60,
|
||||
// align:"center",
|
||||
// customRender:function (t,r,index) {
|
||||
// return parseInt(index)+1;
|
||||
// }
|
||||
// },
|
||||
{
|
||||
title: '家具编号',
|
||||
align: "center",
|
||||
|
@ -151,7 +130,6 @@
|
|||
dataIndex: 'collectingUnitNumber_dictText',
|
||||
width: 200
|
||||
},
|
||||
|
||||
{
|
||||
title: '分类号',
|
||||
align: "center",
|
||||
|
@ -215,9 +193,9 @@
|
|||
width: 80
|
||||
},
|
||||
{
|
||||
title:'存放地id',
|
||||
title: '存放地址',
|
||||
align: "center",
|
||||
dataIndex: 'locationId',
|
||||
dataIndex: 'locationName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
|
|
|
@ -69,8 +69,8 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="存放地id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
|
||||
<a-input v-model="model.locationId" placeholder="请输入存放地id" ></a-input>
|
||||
<a-form-model-item label="存放地地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
|
||||
<a-cascader :options="treeData" placeholder="请选择父级存放地址" @change="onChange"></a-cascader>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
|
@ -80,12 +80,14 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<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-col>
|
||||
<a-col :span="12">
|
||||
<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-col>
|
||||
<a-col :span="12">
|
||||
|
@ -135,7 +137,9 @@
|
|||
add: "/rms/rmsFurniture/add",
|
||||
edit: "/rms/rmsFurniture/edit",
|
||||
queryById: "/rms/rmsFurniture/queryById"
|
||||
}
|
||||
},
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -146,8 +150,19 @@
|
|||
created() {
|
||||
//备份model原始值
|
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
||||
this.getTreeData();
|
||||
},
|
||||
methods: {
|
||||
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);
|
||||
},
|
||||
|
|
|
@ -24,11 +24,13 @@
|
|||
<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-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>
|
||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
|
||||
@handleSuperQuery="handleSuperQuery"></j-super-query>
|
||||
<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>
|
||||
|
@ -40,22 +42,14 @@
|
|||
<!-- 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>项
|
||||
<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="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
class="j-table-force-nowrap"
|
||||
<a-table ref="table" size="middle" :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">
|
||||
|
||||
<template slot="htmlSlot" slot-scope="text">
|
||||
|
@ -63,17 +57,12 @@
|
|||
</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;"/>
|
||||
<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 v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
|
||||
下载
|
||||
</a-button>
|
||||
</template>
|
||||
|
@ -123,22 +112,6 @@
|
|||
description: '仪器信息表管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
// {
|
||||
// title: '#',
|
||||
// dataIndex: '',
|
||||
// key:'rowIndex',
|
||||
// width:60,
|
||||
// align:"center",
|
||||
// customRender:function (t,r,index) {
|
||||
// return parseInt(index)+1;
|
||||
// }
|
||||
// },
|
||||
{
|
||||
title:'ID',
|
||||
align:"center",
|
||||
dataIndex: 'instrumentId',
|
||||
width:80
|
||||
},
|
||||
{
|
||||
title: '仪器编号',
|
||||
align: "center",
|
||||
|
@ -219,9 +192,9 @@
|
|||
dataIndex: 'documentNumber'
|
||||
},
|
||||
{
|
||||
title:'存放地id',
|
||||
title: '存放地址',
|
||||
align: "center",
|
||||
dataIndex: 'locationId',
|
||||
dataIndex: 'locationName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="存放地id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
|
||||
<a-input v-model="model.locationId" placeholder="请输入存放地id" ></a-input>
|
||||
<a-form-model-item label="存放地地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
|
||||
<a-cascader :options="treeData" placeholder="请选择父级存放地址" @change="onChange"></a-cascader>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
|
@ -75,17 +75,14 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<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-col>
|
||||
<a-col :span="12">
|
||||
<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="请选择初审状态" />
|
||||
</a-form-model-item>
|
||||
</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>
|
||||
<j-dict-select-tag type="radio" v-model="model.initialAudit" dictCode="initial_audit"
|
||||
placeholder="请选择初审状态" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -130,7 +127,9 @@
|
|||
add: "/rms/rmsInstrument/add",
|
||||
edit: "/rms/rmsInstrument/edit",
|
||||
queryById: "/rms/rmsInstrument/queryById"
|
||||
}
|
||||
},
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -141,8 +140,19 @@
|
|||
created() {
|
||||
//备份model原始值
|
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
||||
this.getTreeData();
|
||||
},
|
||||
methods: {
|
||||
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);
|
||||
},
|
||||
|
|
|
@ -72,11 +72,6 @@ export default {
|
|||
align: "center",
|
||||
dataIndex: 'sortNumber'
|
||||
},
|
||||
{
|
||||
title: '父级存放地址',
|
||||
align: "center",
|
||||
dataIndex: 'parentLocationId'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
|
@ -109,7 +104,7 @@ export default {
|
|||
selectedRowKeys = selectedRowKeys.join(',')
|
||||
console.log(selectedRowKeys)
|
||||
this.queryParam.id = selectedRowKeys
|
||||
this.loadData()
|
||||
this.loadData(1)
|
||||
},
|
||||
modalFormOk() {
|
||||
this.$refs.locationaTree.getTreeData()
|
||||
|
|
|
@ -63,7 +63,7 @@ export default {
|
|||
queryById: "/rms/rmsLocation/queryById"
|
||||
},
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader'
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader?type=0'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -69,16 +69,16 @@ export default {
|
|||
//回调到父组件
|
||||
this.$emit('onSelect', childKeys);
|
||||
},
|
||||
//只收集本层和下层的key
|
||||
collectChildKeys(node, keys = []) {
|
||||
if (!node) {
|
||||
return keys;
|
||||
}
|
||||
// 如果节点有children,递归遍历它们
|
||||
if (node.children && node.children.length > 0) {
|
||||
node.children.forEach(child => {
|
||||
// 如果节点有children,获取其子节点的key
|
||||
if (node.children) {
|
||||
for (let child of node.children) {
|
||||
keys.push(child.key);
|
||||
this.collectChildKeys(child, keys);
|
||||
});
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue