Merge pull request 'dev' (#1) from xbx/RMS-VUE:dev into dev
Reviewed-on: http://82.157.76.162:3000/Big-Data-Lab/RMS-VUE/pulls/1
This commit is contained in:
commit
e7e68378c7
|
@ -1,5 +1,5 @@
|
|||
NODE_ENV=development
|
||||
VUE_APP_API_BASE_URL=http://localhost:8888/jeecg-boot
|
||||
VUE_APP_API_BASE_URL=http://82.157.76.162:8888/jeecg-boot
|
||||
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
NODE_ENV=production
|
||||
VUE_APP_API_BASE_URL=http://localhost:8888/jeecg-boot
|
||||
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
|
||||
VUE_APP_API_BASE_URL=http://82.157.76.162:8888/jeecg-boot
|
||||
VUE_APP_CAS_BASE_URL=http://82.157.76.162:8888/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
|
41
package.json
41
package.json
|
@ -10,42 +10,43 @@
|
|||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jeecg/antd-online-mini": "3.4.3-beta2",
|
||||
"ant-design-vue": "^1.7.2",
|
||||
"@antv/data-set": "^0.11.4",
|
||||
"viser-vue": "^2.4.8",
|
||||
"@jeecg/antd-online-mini": "3.4.3-beta2",
|
||||
"@tinymce/tinymce-vue": "2.1.0",
|
||||
"@toast-ui/editor": "^2.1.2",
|
||||
"ant-design-vue": "^1.7.2",
|
||||
"axios": "^0.18.0",
|
||||
"china-area-data": "^5.0.1",
|
||||
"clipboard": "^2.0.4",
|
||||
"codemirror": "^5.46.0",
|
||||
"cron-parser": "^2.10.0",
|
||||
"dayjs": "^1.8.0",
|
||||
"dom-align": "1.12.0",
|
||||
"echarts": "^5.4.3",
|
||||
"enquire.js": "^2.1.6",
|
||||
"js-cookie": "^2.2.0",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.pick": "^4.4.0",
|
||||
"md5": "^2.2.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"qiankun": "^2.5.1",
|
||||
"tinymce": "5.4.1",
|
||||
"viser-vue": "^2.4.8",
|
||||
"vue": "^2.6.10",
|
||||
"vue-area-linkage": "^5.1.0",
|
||||
"vue-cropper": "^0.5.4",
|
||||
"vue-i18n": "^8.7.0",
|
||||
"vue-loader": "^15.7.0",
|
||||
"vue-ls": "^3.2.0",
|
||||
"vue-router": "^3.0.1",
|
||||
"vuex": "^3.1.0",
|
||||
"vue-print-nb-jeecg": "^1.0.12",
|
||||
"clipboard": "^2.0.4",
|
||||
"vue-photo-preview": "^1.1.3",
|
||||
"vue-print-nb-jeecg": "^1.0.12",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-splitpane": "^1.0.4",
|
||||
"vuedraggable": "^2.20.0",
|
||||
"codemirror": "^5.46.0",
|
||||
"@tinymce/tinymce-vue": "2.1.0",
|
||||
"tinymce": "5.4.1",
|
||||
"@toast-ui/editor": "^2.1.2",
|
||||
"vue-area-linkage": "^5.1.0",
|
||||
"china-area-data": "^5.0.1",
|
||||
"dom-align": "1.12.0",
|
||||
"xe-utils": "2.4.8",
|
||||
"vuex": "^3.1.0",
|
||||
"vxe-table": "2.9.13",
|
||||
"vxe-table-plugin-antd": "1.8.10",
|
||||
"cron-parser": "^2.10.0",
|
||||
"qiankun": "^2.5.1",
|
||||
"xe-utils": "2.4.8",
|
||||
"xss": "^1.0.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -55,13 +56,13 @@
|
|||
"@vue/cli-service": "^3.3.0",
|
||||
"@vue/eslint-config-standard": "^4.0.0",
|
||||
"babel-eslint": "7.2.3",
|
||||
"compression-webpack-plugin": "^3.1.0",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-plugin-vue": "^5.1.0",
|
||||
"html-webpack-plugin": "^4.2.0",
|
||||
"less": "^3.9.0",
|
||||
"less-loader": "^4.1.0",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"html-webpack-plugin": "^4.2.0",
|
||||
"compression-webpack-plugin": "^3.1.0"
|
||||
"vue-template-compiler": "^2.6.10"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title>计科院ERP系统</title>
|
||||
<title>计算机学院资源管理系统</title>
|
||||
<link rel="icon" href="<%= BASE_URL %>logo.png">
|
||||
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
|
||||
<style>
|
||||
|
@ -249,7 +249,7 @@
|
|||
<div id="loader"></div>
|
||||
<div class="loader-section section-left"></div>
|
||||
<div class="loader-section section-right"></div>
|
||||
<div class="load_title">正在加载 计科院 ERP系统,请耐心等待
|
||||
<div class="load_title">正在加载 计算机学院资源管理系统,请耐心等待
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,62 +1,34 @@
|
|||
<template>
|
||||
<j-modal
|
||||
:width="modalWidth"
|
||||
:visible="visible"
|
||||
:title="title"
|
||||
switchFullscreen
|
||||
wrapClassName="j-user-select-modal"
|
||||
@ok="handleSubmit"
|
||||
@cancel="close"
|
||||
style="top:50px"
|
||||
cancelText="关闭"
|
||||
>
|
||||
<j-modal :width="modalWidth" :visible="visible" :title="title" switchFullscreen wrapClassName="j-user-select-modal"
|
||||
@ok="handleSubmit" @cancel="close" style="top:50px" cancelText="关闭">
|
||||
<a-row :gutter="10" style="background-color: #ececec; padding: 10px; margin: -10px">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-card :bordered="false">
|
||||
<!--组织机构-->
|
||||
<a-directory-tree
|
||||
selectable
|
||||
:selectedKeys="selectedDepIds"
|
||||
:checkStrictly="true"
|
||||
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
|
||||
:treeData="departTree"
|
||||
:expandAction="false"
|
||||
@select="onDepSelect"
|
||||
:load-data="onLoadDepartment"
|
||||
/>
|
||||
<a-directory-tree selectable :selectedKeys="selectedDepIds" :checkStrictly="true"
|
||||
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }" :treeData="departTree" :expandAction="false"
|
||||
@select="onDepSelect" :load-data="onLoadDepartment" />
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :md="18" :sm="24">
|
||||
<a-card :bordered="false">
|
||||
<a-form-model>
|
||||
<a-form-model-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row type="flex" :gutter="8">
|
||||
<a-col :span="18">
|
||||
<a-input-search
|
||||
:style="{width:'100%'}"
|
||||
placeholder="请输入账号"
|
||||
v-model="queryParam.username"
|
||||
@search="onSearch"
|
||||
></a-input-search>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-button @click="searchReset(1)" icon="redo">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
用户姓名:
|
||||
<a-input-search :style="{ width: '150px', marginBottom: '15px' }" placeholder="请输入姓名"
|
||||
v-model="queryParam.realname" @search="onSearch"></a-input-search>
|
||||
<span style="margin-left: 10px"></span>
|
||||
|
||||
用户账号:
|
||||
<a-input-search :style="{ width: '150px', marginBottom: '15px' }" placeholder="请输入账号"
|
||||
v-model="queryParam.username" @search="onSearch"></a-input-search>
|
||||
<!-- 间隔 -->
|
||||
<span style="margin-left: 10px"></span>
|
||||
<a-button @click="searchReset(1)" icon="redo">重置</a-button>
|
||||
|
||||
<!--用户列表-->
|
||||
<a-table
|
||||
ref="table"
|
||||
:scroll="scrollTrigger"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: getType}"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
<a-table ref="table" :scroll="scrollTrigger" size="middle" rowKey="id" :columns="columns"
|
||||
:dataSource="dataSource" :pagination="ipagination"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: getType }"
|
||||
:loading="loading" @change="handleTableChange">
|
||||
</a-table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
|
@ -65,302 +37,303 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { pushIfNotExist, filterObj } from '@/utils/util'
|
||||
import {queryDepartTreeList, getUserList, queryUserByDepId, queryDepartTreeSync} from '@/api/api'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { pushIfNotExist, filterObj } from '@/utils/util'
|
||||
import { queryDepartTreeList, getUserList, queryUserByDepId, queryDepartTreeSync } from '@/api/api'
|
||||
import { getAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'JSelectUserByDepModal',
|
||||
components: {},
|
||||
props: ['modalWidth', 'multi', 'userIds', 'store', 'text'],
|
||||
data() {
|
||||
return {
|
||||
queryParam: {
|
||||
username: "",
|
||||
export default {
|
||||
name: 'JSelectUserByDepModal',
|
||||
components: {},
|
||||
props: ['modalWidth', 'multi', 'userIds', 'store', 'text'],
|
||||
data() {
|
||||
return {
|
||||
queryParam: {
|
||||
username: "",
|
||||
realname: ""
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: '用户账号',
|
||||
align: 'center',
|
||||
dataIndex: 'username'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: '用户账号',
|
||||
align: 'center',
|
||||
dataIndex: 'username'
|
||||
},
|
||||
{
|
||||
title: '用户姓名',
|
||||
align: 'center',
|
||||
dataIndex: 'realname'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: 'center',
|
||||
dataIndex: 'sex',
|
||||
customRender: function (text) {
|
||||
if (text === 1) {
|
||||
return '男'
|
||||
} else if (text === 2) {
|
||||
return '女'
|
||||
} else {
|
||||
return text
|
||||
}
|
||||
{
|
||||
title: '用户姓名',
|
||||
align: 'center',
|
||||
dataIndex: 'realname'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: 'center',
|
||||
dataIndex: 'sex',
|
||||
customRender: function (text) {
|
||||
if (text === 1) {
|
||||
return '男'
|
||||
} else if (text === 2) {
|
||||
return '女'
|
||||
} else {
|
||||
return text
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '手机',
|
||||
align: 'center',
|
||||
dataIndex: 'phone'
|
||||
},
|
||||
{
|
||||
title: '部门',
|
||||
align: 'center',
|
||||
dataIndex: 'orgCodeTxt'
|
||||
}
|
||||
],
|
||||
scrollTrigger: {},
|
||||
dataSource: [],
|
||||
selectionRows: [],
|
||||
selectedRowKeys: [],
|
||||
selectUserRows: [],
|
||||
selectUserIds: [],
|
||||
title: '根据部门选择用户',
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
isorter: {
|
||||
column: 'createTime',
|
||||
order: 'desc'
|
||||
{
|
||||
title: '手机',
|
||||
align: 'center',
|
||||
dataIndex: 'phone'
|
||||
},
|
||||
selectedDepIds: [],
|
||||
departTree: [],
|
||||
visible: false,
|
||||
form: this.$form.createForm(this),
|
||||
loading: false,
|
||||
expandedKeys: [],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 },
|
||||
{
|
||||
title: '部门',
|
||||
align: 'center',
|
||||
dataIndex: 'orgCodeTxt'
|
||||
}
|
||||
],
|
||||
scrollTrigger: {},
|
||||
dataSource: [],
|
||||
selectionRows: [],
|
||||
selectedRowKeys: [],
|
||||
selectUserRows: [],
|
||||
selectUserIds: [],
|
||||
title: '根据部门选择用户',
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 },
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 计算属性的 getter
|
||||
getType: function () {
|
||||
return this.multi == true ? 'checkbox' : 'radio';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
userIds: {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.initUserNames()
|
||||
}
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// 该方法触发屏幕自适应
|
||||
this.resetScreenSize();
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
initUserNames() {
|
||||
if (this.userIds) {
|
||||
// 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
|
||||
let values = this.userIds.split(',') + ','
|
||||
let param = {[this.store]: values}
|
||||
getAction('/sys/user/getMultiUser', param).then((list)=>{
|
||||
this.selectionRows = []
|
||||
let selectedRowKeys = []
|
||||
let textArray = []
|
||||
if(list && list.length>0){
|
||||
for(let user of list){
|
||||
textArray.push(user[this.text])
|
||||
selectedRowKeys.push(user['id'])
|
||||
this.selectionRows.push(user)
|
||||
}
|
||||
}
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.$emit('initComp', textArray.join(','))
|
||||
})
|
||||
|
||||
} else {
|
||||
// JSelectUserByDep组件bug issues/I16634
|
||||
this.$emit('initComp', '')
|
||||
// 前端用户选择单选无法置空的问题 #2610
|
||||
this.selectedRowKeys = []
|
||||
}
|
||||
isorter: {
|
||||
column: 'createTime',
|
||||
order: 'desc'
|
||||
},
|
||||
async loadData(arg) {
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1;
|
||||
}
|
||||
let params = this.getQueryParams()//查询条件
|
||||
this.loading = true
|
||||
getAction('/sys/user/queryUserComponentData', params).then(res=>{
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records
|
||||
this.ipagination.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
selectedDepIds: [],
|
||||
departTree: [],
|
||||
visible: false,
|
||||
form: this.$form.createForm(this),
|
||||
loading: false,
|
||||
expandedKeys: [],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 },
|
||||
},
|
||||
// 触发屏幕自适应
|
||||
resetScreenSize() {
|
||||
let screenWidth = document.body.clientWidth;
|
||||
if (screenWidth < 500) {
|
||||
this.scrollTrigger = {x: 800};
|
||||
} else {
|
||||
this.scrollTrigger = {};
|
||||
}
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 },
|
||||
},
|
||||
showModal() {
|
||||
this.visible = true;
|
||||
this.queryDepartTree();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 计算属性的 getter
|
||||
getType: function () {
|
||||
return this.multi == true ? 'checkbox' : 'radio';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
userIds: {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.initUserNames()
|
||||
this.loadData();
|
||||
this.form.resetFields();
|
||||
},
|
||||
getQueryParams() {
|
||||
let param = Object.assign({}, this.queryParam, this.isorter);
|
||||
param.field = this.getQueryField();
|
||||
param.pageNo = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
param.departId = this.selectedDepIds.join(',')
|
||||
return filterObj(param);
|
||||
},
|
||||
getQueryField() {
|
||||
let str = 'id,';
|
||||
for (let a = 0; a < this.columns.length; a++) {
|
||||
str += ',' + this.columns[a].dataIndex;
|
||||
}
|
||||
return str;
|
||||
},
|
||||
searchReset(num) {
|
||||
let that = this;
|
||||
that.selectedRowKeys = [];
|
||||
that.selectUserIds = [];
|
||||
that.selectedDepIds = [];
|
||||
if (num !== 0) {
|
||||
that.queryParam = {};
|
||||
that.loadData(1);
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.searchReset(0);
|
||||
this.visible = false;
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
//TODO 筛选
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter.column = sorter.field;
|
||||
this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc';
|
||||
}
|
||||
this.ipagination = pagination;
|
||||
this.loadData();
|
||||
},
|
||||
handleSubmit() {
|
||||
let that = this;
|
||||
this.getSelectUserRows();
|
||||
that.$emit('ok', that.selectUserRows);
|
||||
that.searchReset(0)
|
||||
that.close();
|
||||
},
|
||||
//获取选择用户信息
|
||||
getSelectUserRows() {
|
||||
this.selectUserRows = []
|
||||
for (let row of this.selectionRows) {
|
||||
if (this.selectedRowKeys.includes(row.id)) {
|
||||
this.selectUserRows.push(row)
|
||||
}
|
||||
}
|
||||
this.selectUserIds = this.selectUserRows.map(row => row.username).join(',')
|
||||
},
|
||||
// 点击树节点,筛选出对应的用户
|
||||
onDepSelect(selectedDepIds) {
|
||||
if (selectedDepIds[0] != null) {
|
||||
if (this.selectedDepIds[0] !== selectedDepIds[0]) {
|
||||
this.selectedDepIds = [selectedDepIds[0]];
|
||||
}
|
||||
this.loadData(1);
|
||||
}
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectionRows) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
selectionRows.forEach(row => pushIfNotExist(this.selectionRows, row, 'id'))
|
||||
},
|
||||
onSearch() {
|
||||
this.loadData(1);
|
||||
},
|
||||
// 根据选择的id来查询用户信息
|
||||
initQueryUserByDepId(selectedDepIds) {
|
||||
this.loading = true
|
||||
return queryUserByDepId({id: selectedDepIds.toString()}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result;
|
||||
this.ipagination.total = res.result.length;
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
queryDepartTree() {
|
||||
//update-begin-author:taoyan date:20211202 for: 异步加载部门树 https://github.com/jeecgboot/jeecg-boot/issues/3196
|
||||
this.expandedKeys = []
|
||||
this.departTree = []
|
||||
queryDepartTreeSync().then((res) => {
|
||||
if (res.success) {
|
||||
for (let i = 0; i < res.result.length; i++) {
|
||||
let temp = res.result[i]
|
||||
this.departTree.push(temp)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onLoadDepartment(treeNode){
|
||||
return new Promise(resolve => {
|
||||
queryDepartTreeSync({pid:treeNode.dataRef.id}).then((res) => {
|
||||
if (res.success) {
|
||||
//判断chidlren是否为空,并修改isLeaf属性值
|
||||
if(res.result.length == 0){
|
||||
treeNode.dataRef['isLeaf']=true
|
||||
return;
|
||||
}else{
|
||||
treeNode.dataRef['children']= res.result;
|
||||
}
|
||||
}
|
||||
})
|
||||
resolve();
|
||||
});
|
||||
},
|
||||
//update-end-author:taoyan date:20211202 for: 异步加载部门树 https://github.com/jeecgboot/jeecg-boot/issues/3196
|
||||
modalFormOk() {
|
||||
this.loadData();
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// 该方法触发屏幕自适应
|
||||
this.resetScreenSize();
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
initUserNames() {
|
||||
if (this.userIds) {
|
||||
// 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确
|
||||
let values = this.userIds.split(',') + ','
|
||||
let param = { [this.store]: values }
|
||||
getAction('/sys/user/getMultiUser', param).then((list) => {
|
||||
this.selectionRows = []
|
||||
let selectedRowKeys = []
|
||||
let textArray = []
|
||||
if (list && list.length > 0) {
|
||||
for (let user of list) {
|
||||
textArray.push(user[this.text])
|
||||
selectedRowKeys.push(user['id'])
|
||||
this.selectionRows.push(user)
|
||||
}
|
||||
}
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.$emit('initComp', textArray.join(','))
|
||||
})
|
||||
|
||||
} else {
|
||||
// JSelectUserByDep组件bug issues/I16634
|
||||
this.$emit('initComp', '')
|
||||
// 前端用户选择单选无法置空的问题 #2610
|
||||
this.selectedRowKeys = []
|
||||
}
|
||||
},
|
||||
async loadData(arg) {
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1;
|
||||
}
|
||||
let params = this.getQueryParams()//查询条件
|
||||
this.loading = true
|
||||
getAction('/sys/user/queryUserComponentData', params).then(res => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records
|
||||
this.ipagination.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 触发屏幕自适应
|
||||
resetScreenSize() {
|
||||
let screenWidth = document.body.clientWidth;
|
||||
if (screenWidth < 500) {
|
||||
this.scrollTrigger = { x: 800 };
|
||||
} else {
|
||||
this.scrollTrigger = {};
|
||||
}
|
||||
},
|
||||
showModal() {
|
||||
this.visible = true;
|
||||
this.queryDepartTree();
|
||||
this.initUserNames()
|
||||
this.loadData();
|
||||
this.form.resetFields();
|
||||
},
|
||||
getQueryParams() {
|
||||
let param = Object.assign({}, this.queryParam, this.isorter);
|
||||
param.field = this.getQueryField();
|
||||
param.pageNo = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
param.departId = this.selectedDepIds.join(',')
|
||||
return filterObj(param);
|
||||
},
|
||||
getQueryField() {
|
||||
let str = 'id,';
|
||||
for (let a = 0; a < this.columns.length; a++) {
|
||||
str += ',' + this.columns[a].dataIndex;
|
||||
}
|
||||
return str;
|
||||
},
|
||||
searchReset(num) {
|
||||
let that = this;
|
||||
that.selectedRowKeys = [];
|
||||
that.selectUserIds = [];
|
||||
that.selectedDepIds = [];
|
||||
if (num !== 0) {
|
||||
that.queryParam = {};
|
||||
that.loadData(1);
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.searchReset(0);
|
||||
this.visible = false;
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
//TODO 筛选
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter.column = sorter.field;
|
||||
this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc';
|
||||
}
|
||||
this.ipagination = pagination;
|
||||
this.loadData();
|
||||
},
|
||||
handleSubmit() {
|
||||
let that = this;
|
||||
this.getSelectUserRows();
|
||||
that.$emit('ok', that.selectUserRows);
|
||||
that.searchReset(0)
|
||||
that.close();
|
||||
},
|
||||
//获取选择用户信息
|
||||
getSelectUserRows() {
|
||||
this.selectUserRows = []
|
||||
for (let row of this.selectionRows) {
|
||||
if (this.selectedRowKeys.includes(row.id)) {
|
||||
this.selectUserRows.push(row)
|
||||
}
|
||||
}
|
||||
this.selectUserIds = this.selectUserRows.map(row => row.username).join(',')
|
||||
},
|
||||
// 点击树节点,筛选出对应的用户
|
||||
onDepSelect(selectedDepIds) {
|
||||
if (selectedDepIds[0] != null) {
|
||||
if (this.selectedDepIds[0] !== selectedDepIds[0]) {
|
||||
this.selectedDepIds = [selectedDepIds[0]];
|
||||
}
|
||||
this.loadData(1);
|
||||
}
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectionRows) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
selectionRows.forEach(row => pushIfNotExist(this.selectionRows, row, 'id'))
|
||||
},
|
||||
onSearch() {
|
||||
this.loadData(1);
|
||||
},
|
||||
// 根据选择的id来查询用户信息
|
||||
initQueryUserByDepId(selectedDepIds) {
|
||||
this.loading = true
|
||||
return queryUserByDepId({ id: selectedDepIds.toString() }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result;
|
||||
this.ipagination.total = res.result.length;
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
queryDepartTree() {
|
||||
//update-begin-author:taoyan date:20211202 for: 异步加载部门树 https://github.com/jeecgboot/jeecg-boot/issues/3196
|
||||
this.expandedKeys = []
|
||||
this.departTree = []
|
||||
queryDepartTreeSync().then((res) => {
|
||||
if (res.success) {
|
||||
for (let i = 0; i < res.result.length; i++) {
|
||||
let temp = res.result[i]
|
||||
this.departTree.push(temp)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onLoadDepartment(treeNode) {
|
||||
return new Promise(resolve => {
|
||||
queryDepartTreeSync({ pid: treeNode.dataRef.id }).then((res) => {
|
||||
if (res.success) {
|
||||
//判断chidlren是否为空,并修改isLeaf属性值
|
||||
if (res.result.length == 0) {
|
||||
treeNode.dataRef['isLeaf'] = true
|
||||
return;
|
||||
} else {
|
||||
treeNode.dataRef['children'] = res.result;
|
||||
}
|
||||
}
|
||||
})
|
||||
resolve();
|
||||
});
|
||||
},
|
||||
//update-end-author:taoyan date:20211202 for: 异步加载部门树 https://github.com/jeecgboot/jeecg-boot/issues/3196
|
||||
modalFormOk() {
|
||||
this.loadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ant-table-tbody .ant-table-row td {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.ant-table-tbody .ant-table-row td {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#components-layout-demo-custom-trigger .trigger {
|
||||
font-size: 18px;
|
||||
line-height: 64px;
|
||||
padding: 0 24px;
|
||||
cursor: pointer;
|
||||
transition: color .3s;
|
||||
}
|
||||
#components-layout-demo-custom-trigger .trigger {
|
||||
font-size: 18px;
|
||||
line-height: 64px;
|
||||
padding: 0 24px;
|
||||
cursor: pointer;
|
||||
transition: color .3s;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
* @param title 要修改的新标题
|
||||
*/
|
||||
changeTitle(title) {
|
||||
let projectTitle = "计科院ERP系统"
|
||||
let projectTitle = "计算机学院资源管理系统"
|
||||
// 首页特殊处理
|
||||
if (this.$route.path === indexKey) {
|
||||
document.title = projectTitle
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="header">
|
||||
<a href="/">
|
||||
<img src="~@/assets/logo.svg" class="logo" alt="logo" />
|
||||
<span class="title">计科院ERP系统</span>
|
||||
<span class="title">计算机学院资源管理系统</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="desc">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
:type="collapsed ? 'menu-unfold' : 'menu-fold'"
|
||||
@click="toggle"/>
|
||||
|
||||
<span v-if="device === 'desktop'">欢迎进入 计科院ERP系统</span>
|
||||
<span v-if="device === 'desktop'">欢迎进入 计算机学院资源管理系统</span>
|
||||
<span v-else>Jeecg-Boot</span>
|
||||
|
||||
<user-menu :theme="theme"/>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: '计科院ERP系统',
|
||||
default: '资源管理系统',
|
||||
required: false
|
||||
},
|
||||
showTitle: {
|
||||
|
@ -38,6 +38,9 @@
|
|||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
h1 {
|
||||
font-size: 4px; /* 这里的数字可以根据需要进行调整 */
|
||||
}
|
||||
/*缩小首页布 局顶部的高度*/
|
||||
@height: 59px;
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ import router from './router'
|
|||
import store from './store/'
|
||||
import { VueAxios } from "@/utils/request"
|
||||
|
||||
import * as echarts from 'echarts'
|
||||
Vue.prototype.$echarts = echarts
|
||||
|
||||
require('@jeecg/antd-online-mini')
|
||||
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
|
||||
|
||||
|
|
|
@ -297,6 +297,38 @@ export const JeecgListMixin = {
|
|||
}
|
||||
})
|
||||
},
|
||||
// 重写导出方法
|
||||
ExportData(fileName, TimestampData) {
|
||||
console.log("传入的时间戳"+TimestampData)
|
||||
if (!fileName || typeof fileName != "string") {
|
||||
fileName = "导出文件"
|
||||
}
|
||||
let param = this.getQueryParams();
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
param['selections'] = this.selectedRowKeys.join(",")
|
||||
}
|
||||
param['timestamp'] = TimestampData
|
||||
console.log("导出参数", param)
|
||||
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning("文件下载失败")
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
||||
} else {
|
||||
let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||
let link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = url
|
||||
link.setAttribute('download', fileName + '.xls')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link); //下载完成移除元素
|
||||
window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||
}
|
||||
})
|
||||
},
|
||||
/* 导入 */
|
||||
handleImportExcel(info){
|
||||
this.loading = true;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { constantRouterMap } from '@/config/router.config'
|
|||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
mode: 'hash',
|
||||
base: process.env.BASE_URL,
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRouterMap
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<index-chart v-if="indexStyle==1"></index-chart>
|
||||
<index-bdc v-if="indexStyle==2"></index-bdc>
|
||||
<!-- <index-bdc v-if="indexStyle==2"></index-bdc>
|
||||
<index-task v-if="indexStyle==3"></index-task>
|
||||
<div style="width: 100%;text-align: right;margin-top: 20px">
|
||||
请选择首页样式:
|
||||
|
@ -10,7 +10,7 @@
|
|||
<a-radio :value="2">统计图表2</a-radio>
|
||||
<a-radio :value="3">任务表格</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<div class="page-header-index-wide">
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||
<chart-card :loading="loading" title="受理量" :total="cardCount.sll | NumberFormat">
|
||||
<chart-card :loading="loading" title="成员访问次数" :total="cardCount.sll | NumberFormat">
|
||||
<a-tooltip title="指标说明" slot="action">
|
||||
<a-icon type="info-circle-o" />
|
||||
</a-tooltip>
|
||||
<div>
|
||||
<mini-area :data-source="chartData.sll" />
|
||||
</div>
|
||||
<template slot="footer">今日受理量:<span>{{ todaySll }}</span></template>
|
||||
<template slot="footer">今日访问量:<span>{{ todaySll }}</span></template>
|
||||
</chart-card>
|
||||
</a-col>
|
||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||
|
@ -60,10 +60,10 @@
|
|||
<a-range-picker :style="{width: '256px'}" />
|
||||
</div>
|
||||
|
||||
<a-tab-pane loading="true" tab="受理监管" key="1">
|
||||
<a-tab-pane loading="true" tab="访问监管" key="1">
|
||||
<a-row>
|
||||
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
<index-bar title="受理量统计" />
|
||||
<index-bar title="访问量统计" />
|
||||
</a-col>
|
||||
<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
|
||||
|
|
|
@ -1,268 +1,224 @@
|
|||
<template>
|
||||
<div class="page-header-index-wide">
|
||||
<div>
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||
<chart-card :loading="loading" title="总销售额" total="¥126,560">
|
||||
<a-tooltip title="指标说明" slot="action">
|
||||
<a-icon type="info-circle-o" />
|
||||
</a-tooltip>
|
||||
<div>
|
||||
<trend flag="up" style="margin-right: 16px;">
|
||||
<span slot="term">周同比</span>
|
||||
12%
|
||||
</trend>
|
||||
<trend flag="down">
|
||||
<span slot="term">日同比</span>
|
||||
11%
|
||||
</trend>
|
||||
</div>
|
||||
<template slot="footer">日均销售额<span>¥ 234.56</span></template>
|
||||
<chart-card title="仪器总数" :total="this.InstrumentCount">
|
||||
<template slot="footer">仪器总价:<span>{{ this.InstrumentAmount }}</span></template>
|
||||
</chart-card>
|
||||
</a-col>
|
||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||
<chart-card :loading="loading" title="订单量" :total="8846 | NumberFormat">
|
||||
<a-tooltip title="指标说明" slot="action">
|
||||
<a-icon type="info-circle-o" />
|
||||
</a-tooltip>
|
||||
<div>
|
||||
<mini-area />
|
||||
</div>
|
||||
<template slot="footer">日订单量<span> {{ '1234' | NumberFormat }}</span></template>
|
||||
<chart-card title="家具总数" :total="this.FurnitureCount">
|
||||
<template slot="footer">家具总价<span>{{ this.FurnitureAmount }}</span></template>
|
||||
</chart-card>
|
||||
</a-col>
|
||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||
<chart-card :loading="loading" title="支付笔数" :total="6560 | NumberFormat">
|
||||
<a-tooltip title="指标说明" slot="action">
|
||||
<a-icon type="info-circle-o" />
|
||||
</a-tooltip>
|
||||
<div>
|
||||
<mini-bar :height="40" />
|
||||
</div>
|
||||
<template slot="footer">转化率 <span>60%</span></template>
|
||||
<chart-card title="无形资产总数" :total="this.IntangibleCount">
|
||||
<template slot="footer">无形资产总价:<span>{{ this.IntangibleAmount }}</span></template>
|
||||
</chart-card>
|
||||
</a-col>
|
||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||
<chart-card :loading="loading" title="运营活动效果" total="78%">
|
||||
<a-tooltip title="指标说明" slot="action">
|
||||
<a-icon type="info-circle-o" />
|
||||
</a-tooltip>
|
||||
<div>
|
||||
<mini-progress color="rgb(19, 194, 194)" :target="80" :percentage="78" :height="8" />
|
||||
</div>
|
||||
<template slot="footer">
|
||||
<trend flag="down" style="margin-right: 16px;">
|
||||
<span slot="term">同周比</span>
|
||||
12%
|
||||
</trend>
|
||||
<trend flag="up">
|
||||
<span slot="term">日环比</span>
|
||||
80%
|
||||
</trend>
|
||||
</template>
|
||||
<chart-card title="资产总数" :total="this.InstrumentCount + this.FurnitureCount + this.IntangibleCount">
|
||||
<template slot="footer">总资产价值量:<span>{{ this.InstrumentAmount + this.FurnitureAmount
|
||||
+ this.IntangibleAmount }}</span></template>
|
||||
</chart-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
|
||||
<div class="salesCard">
|
||||
<a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
|
||||
<div class="extra-wrapper" slot="tabBarExtraContent">
|
||||
<div class="extra-item">
|
||||
<a>今日</a>
|
||||
<a>本周</a>
|
||||
<a>本月</a>
|
||||
<a>本年</a>
|
||||
</div>
|
||||
<a-range-picker :style="{width: '256px'}" />
|
||||
</div>
|
||||
<a-tab-pane loading="true" tab="销售额" key="1">
|
||||
<a-row>
|
||||
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
<bar title="销售额排行" :dataSource="barData"/>
|
||||
</a-col>
|
||||
<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
<rank-list title="门店销售排行榜" :list="rankList"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="销售趋势" key="2">
|
||||
<a-row>
|
||||
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
<bar title="销售额趋势" :dataSource="barData"/>
|
||||
</a-col>
|
||||
<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
|
||||
<rank-list title="门店销售排行榜" :list="rankList"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-card :loading="loading" :bordered="false" title="最近一周访问量统计" :style="{ marginTop: '24px' }">
|
||||
<a-row>
|
||||
<a-col :span="6">
|
||||
<head-info title="今日IP" :content="loginfo.todayIp"></head-info>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-spin class='circle-cust'>
|
||||
<a-icon slot="indicator" type="environment" style="font-size: 24px" />
|
||||
</a-spin>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<head-info title="今日访问" :content="loginfo.todayVisitCount"></head-info>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-spin class='circle-cust'>
|
||||
<a-icon slot="indicator" type="team" style="font-size: 24px" />
|
||||
</a-spin>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<head-info title="总访问量" :content="loginfo.totalVisitCount"></head-info>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-spin class='circle-cust'>
|
||||
<a-icon slot="indicator" type="rise" style="font-size: 24px" />
|
||||
</a-spin>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="container">
|
||||
<div id="main" style="width: 600px; height: 400px"></div>
|
||||
<div id="pie" style="width: 600px; height: 400px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ChartCard from '@/components/ChartCard'
|
||||
import ACol from "ant-design-vue/es/grid/Col"
|
||||
import ATooltip from "ant-design-vue/es/tooltip/Tooltip"
|
||||
import MiniArea from '@/components/chart/MiniArea'
|
||||
import MiniBar from '@/components/chart/MiniBar'
|
||||
import MiniProgress from '@/components/chart/MiniProgress'
|
||||
import RankList from '@/components/chart/RankList'
|
||||
import Bar from '@/components/chart/Bar'
|
||||
import LineChartMultid from '@/components/chart/LineChartMultid'
|
||||
import HeadInfo from '@/components/tools/HeadInfo.vue'
|
||||
import ACol from "ant-design-vue/es/grid/Col"
|
||||
import ChartCard from '@/components/ChartCard'
|
||||
import { getAction } from '../../api/manage'
|
||||
|
||||
import Trend from '@/components/Trend'
|
||||
import { getLoginfo,getVisitInfo } from '@/api/api'
|
||||
|
||||
const rankList = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
rankList.push({
|
||||
name: '白鹭岛 ' + (i+1) + ' 号店',
|
||||
total: 1234.56 - i * 100
|
||||
})
|
||||
}
|
||||
const barData = []
|
||||
for (let i = 0; i < 12; i += 1) {
|
||||
barData.push({
|
||||
x: `${i + 1}月`,
|
||||
y: Math.floor(Math.random() * 1000) + 200
|
||||
})
|
||||
}
|
||||
export default {
|
||||
name: "IndexChart",
|
||||
components: {
|
||||
ATooltip,
|
||||
ACol,
|
||||
ChartCard,
|
||||
MiniArea,
|
||||
MiniBar,
|
||||
MiniProgress,
|
||||
RankList,
|
||||
Bar,
|
||||
Trend,
|
||||
LineChartMultid,
|
||||
HeadInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
center: null,
|
||||
rankList,
|
||||
barData,
|
||||
loginfo:{},
|
||||
visitFields:['ip','visit'],
|
||||
visitInfo:[],
|
||||
indicator: <a-icon type="loading" style="font-size: 24px" spin />
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
this.loading = !this.loading
|
||||
}, 1000)
|
||||
this.initLogInfo();
|
||||
},
|
||||
methods: {
|
||||
initLogInfo () {
|
||||
getLoginfo(null).then((res)=>{
|
||||
if(res.success){
|
||||
Object.keys(res.result).forEach(key=>{
|
||||
res.result[key] =res.result[key]+""
|
||||
})
|
||||
this.loginfo = res.result;
|
||||
}
|
||||
})
|
||||
getVisitInfo().then(res=>{
|
||||
if(res.success){
|
||||
this.visitInfo = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
export default {
|
||||
components: {
|
||||
ACol,
|
||||
ChartCard,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
PieChartData: [],
|
||||
ChartData: [],
|
||||
LocationName: [],
|
||||
ChartDataSum: 0,
|
||||
InstrumentCount: 0,
|
||||
FurnitureCount: 0,
|
||||
IntangibleCount: 0,
|
||||
InstrumentAmount: 0,
|
||||
FurnitureAmount: 0,
|
||||
IntangibleAmount: 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getChart() {
|
||||
getAction('/rms/rmsDepart/getChart').then(res => {
|
||||
this.ChartData = res;
|
||||
this.drawChart();
|
||||
})
|
||||
},
|
||||
getPieChart() {
|
||||
getAction('/rms/rmsDepart/getPieChart').then(res => {
|
||||
this.PieChartData = res;
|
||||
this.drawPie();
|
||||
})
|
||||
},
|
||||
getLocationName() {
|
||||
getAction("/rms/rmsDepart/getLocationName").then(res => {
|
||||
this.LocationName = res;
|
||||
console.log("位置:" + this.LocationName)
|
||||
})
|
||||
},
|
||||
getInstrumentCount() {
|
||||
getAction('/rms/rmsDepart/getInstrumentCount').then(res => {
|
||||
this.InstrumentCount = res;
|
||||
console.log("仪器总数" + this.InstrumentCount)
|
||||
})
|
||||
},
|
||||
getFurnitureCount() {
|
||||
getAction('/rms/rmsDepart/getFurnitureCount').then(res => {
|
||||
this.FurnitureCount = res;
|
||||
console.log("家具总数:" + this.FurnitureCount)
|
||||
|
||||
})
|
||||
},
|
||||
getIntangibleCount(){
|
||||
getAction('/rms/rmsDepart/getIntangibleCount').then(res => {
|
||||
this.IntangibleCount = res;
|
||||
console.log("无形资产总数:" + this.IntangibleCount)
|
||||
})
|
||||
},
|
||||
getInstrumentAmount() {
|
||||
getAction('/rms/rmsDepart/getInstrumentAmount').then(res => {
|
||||
this.InstrumentAmount = res;
|
||||
})
|
||||
},
|
||||
getFurnitureAmount() {
|
||||
getAction('/rms/rmsDepart/getFurnitureAmount').then(res => {
|
||||
this.FurnitureAmount = res;
|
||||
})
|
||||
},
|
||||
getIntangibleAmount(){
|
||||
getAction('/rms/rmsDepart/getIntangibleAmount').then(res => {
|
||||
this.IntangibleAmount = res;
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
drawChart() {
|
||||
// 基于准备好的dom,初始化echarts实例 这个和上面的main对应
|
||||
let myChart = this.$echarts.init(document.getElementById("main"));
|
||||
// 指定图表的配置项和数据
|
||||
let option = {
|
||||
title: {
|
||||
text: "资产分布",
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
data: ["资产数量"],
|
||||
},
|
||||
xAxis: {
|
||||
data: this.LocationName,
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 30
|
||||
}
|
||||
},
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
name: "资产数量",
|
||||
type: "bar",
|
||||
data: this.ChartData,
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'top'
|
||||
},
|
||||
formatter: '{@value}'
|
||||
}
|
||||
},
|
||||
],
|
||||
};
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option);
|
||||
},
|
||||
drawPie() {
|
||||
let myChart = this.$echarts.init(document.getElementById("pie"));
|
||||
|
||||
|
||||
|
||||
let option = {
|
||||
title: {
|
||||
text: "领用单位资产数统计",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 40,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: this.PieChartData
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getPieChart();
|
||||
this.getChart();
|
||||
this.getLocationName();
|
||||
this.getInstrumentCount();
|
||||
this.getFurnitureCount();
|
||||
this.getIntangibleCount();
|
||||
this.getInstrumentAmount();
|
||||
this.getFurnitureAmount();
|
||||
this.getIntangibleAmount();
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.circle-cust{
|
||||
position: relative;
|
||||
top: 28px;
|
||||
left: -100%;
|
||||
}
|
||||
.extra-wrapper {
|
||||
line-height: 55px;
|
||||
padding-right: 24px;
|
||||
.container {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
padding: 24px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
|
||||
|
||||
.extra-item {
|
||||
display: inline-block;
|
||||
margin-right: 24px;
|
||||
|
||||
a {
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 首页访问量统计 */
|
||||
.head-info {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
padding: 0 32px 0 0;
|
||||
min-width: 125px;
|
||||
|
||||
&.center {
|
||||
text-align: center;
|
||||
padding: 0 32px;
|
||||
}
|
||||
|
||||
span {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
display: inline-block;
|
||||
font-size: .95rem;
|
||||
line-height: 42px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
p {
|
||||
line-height: 42px;
|
||||
margin: 0;
|
||||
a {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,327 @@
|
|||
<template>
|
||||
<a-card :bordered="false" style="height: 770px;">
|
||||
|
||||
<a-row>
|
||||
<a-col :span="5">
|
||||
<locationaTree ref="locationaTree" :height="600" @onSelect="onSelectTree"></locationaTree>
|
||||
</a-col>
|
||||
<a-col :span="19">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="5" :lg="7" :md="8" :sm="24">
|
||||
<a-auto-complete v-model="queryParam.recipient" :dataSource="UserdataSource"
|
||||
placeholder="请选择领用人" @select="onSelect" @search="onSearch" @change="onChange" />
|
||||
</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>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 查询区域-END -->
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<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-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="zoom-in" @click="showHistoryModal">历史数据</a-button>
|
||||
<a-modal v-model="historyModalVisible" title="历史数据" @ok="closeHistoryModal">
|
||||
<div class="modal-content">
|
||||
<!-- 在这里显示历史数据 -->
|
||||
<div v-for="TimestampData in historyData" :key="TimestampData.id" class="container">
|
||||
<div class="left">
|
||||
<p style="font-size: 17px;">{{ TimestampData }}</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a-button type="primary" icon="download"
|
||||
@click="ExportData('家具信息表', TimestampData)">导出</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 高级查询区域 -->
|
||||
<!-- <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>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
||||
</a-dropdown>
|
||||
</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-row>
|
||||
|
||||
<!-- <a-col :span=""> -->
|
||||
|
||||
<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="usageYears" slot-scope="text">
|
||||
{{ text + '年' }}
|
||||
</template>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDetail(record)">详情</a>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
<!-- </a-col> -->
|
||||
</a-row>
|
||||
</div>
|
||||
|
||||
<rms-furniture-modal ref="modalForm" @ok="modalFormOk"></rms-furniture-modal>
|
||||
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import RmsFurnitureModal from './modules/RmsFurnitureModal'
|
||||
import { getAction } from '../../../api/manage'
|
||||
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
||||
import locationaTree from '../components/locationaTree'
|
||||
|
||||
export default {
|
||||
name: 'RmsFurnitureList',
|
||||
mixins: [JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
RmsFurnitureModal,
|
||||
RmsLocationModal,
|
||||
locationaTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
dataSource: [],
|
||||
UserdataSource: [],
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '家具编号',
|
||||
align: "center",
|
||||
dataIndex: 'furnitureNumber',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '家具名称',
|
||||
align: "center",
|
||||
dataIndex: 'furnitureName',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '领用单位号',
|
||||
align: "center",
|
||||
dataIndex: 'collectingUnitNumber_dictText',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '分类号',
|
||||
align: "center",
|
||||
dataIndex: 'categoryId',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '型号',
|
||||
align: "center",
|
||||
dataIndex: 'model',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '规格',
|
||||
align: "center",
|
||||
dataIndex: 'specifications',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
align: "center",
|
||||
dataIndex: 'number',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
align: "center",
|
||||
dataIndex: 'unitPrice',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '金额',
|
||||
align: "center",
|
||||
dataIndex: 'amount',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '厂家',
|
||||
align: "center",
|
||||
dataIndex: 'manufactuer',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '购置日期',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseDate',
|
||||
customRender: function (text) {
|
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
},
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '领用人',
|
||||
align: "center",
|
||||
dataIndex: 'recipient_dictText',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '单据号',
|
||||
align: "center",
|
||||
dataIndex: 'documentNumber',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '存放地址',
|
||||
align: "center",
|
||||
dataIndex: 'locationName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
align: "center",
|
||||
dataIndex: 'note',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
align: "center",
|
||||
dataIndex: 'approvalStatus_dictText',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '初审状态',
|
||||
align: "center",
|
||||
dataIndex: 'initialAudit_dictText',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '使用年限',
|
||||
align: "center",
|
||||
dataIndex: 'usageYears',
|
||||
scopedSlots: { customRender: 'usageYears' }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 160,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/rms/rmsFurniture/list",
|
||||
delete: "/rms/rmsFurniture/delete",
|
||||
deleteBatch: "/rms/rmsFurniture/deleteBatch",
|
||||
exportXlsUrl: "/rms/rmsFurniture/exportXls",
|
||||
importExcelUrl: "rms/rmsFurniture/importExcel",
|
||||
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
|
||||
timestampUrl: "/rms/rmsFurniture/getTimestamp",
|
||||
|
||||
},
|
||||
UserList: {},
|
||||
historyModalVisible: false, // 控制历史数据模态框的显示与隐藏
|
||||
historyData: [] // 历史数据数组,用于存储所有历史数据
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
showHistoryModal() {
|
||||
getAction(this.url.timestampUrl).then(res => {
|
||||
console.log(res)
|
||||
this.historyData = res;
|
||||
})
|
||||
|
||||
this.historyModalVisible = true; // 显示历史数据模态框
|
||||
},
|
||||
closeHistoryModal() {
|
||||
this.historyModalVisible = false; // 关闭历史数据模态框
|
||||
},
|
||||
//获取用户信息
|
||||
getUserInfo() {
|
||||
getAction(this.url.userUrl).then(res => {
|
||||
this.UserList = res.result.records;
|
||||
})
|
||||
},
|
||||
onSearch(query) {
|
||||
this.UserdataSource = this.UserList.filter(user =>
|
||||
user.username.includes(query) || user.realname.includes(query)
|
||||
).map(user => ({
|
||||
value: user.username,
|
||||
text: user.realname
|
||||
}));
|
||||
},
|
||||
onSelectTree(selectedRowKeys) {
|
||||
//将其切分为字符串
|
||||
selectedRowKeys = selectedRowKeys.join(',')
|
||||
console.log(selectedRowKeys)
|
||||
this.queryParam.locationId = selectedRowKeys
|
||||
this.loadData(1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
.modal-content {
|
||||
max-height: 400px; /* 设置最大高度,根据需要进行调整 */
|
||||
overflow-y: auto; /* 添加垂直滚动条 */
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<j-form-container :disabled="formDisabled">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="领用单位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="collectingUnitNumber">
|
||||
<j-select-depart v-model="model.collectingUnitNumber" :multi="false" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="家具编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureNumber">
|
||||
<a-input v-model="model.furnitureNumber" placeholder="请输入家具编号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="家具名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureName">
|
||||
<a-input v-model="model.furnitureName" placeholder="请输入家具名称"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
|
||||
<a-input v-model="model.categoryId" placeholder="请输入分类号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="model">
|
||||
<a-input v-model="model.model" placeholder="请输入型号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
|
||||
<a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
|
||||
<a-input v-model="model.number" placeholder="请输入数量"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
|
||||
<a-input v-model="model.unitPrice" placeholder="请输入单价"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
|
||||
<a-input v-model="model.amount" placeholder="请输入金额"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufactuer">
|
||||
<a-input v-model="model.manufactuer" placeholder="请输入厂家"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="购置日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purchaseDate">
|
||||
<j-date placeholder="请选择购置日期" v-model="model.purchaseDate" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="领用人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recipient">
|
||||
<j-select-user-by-dep v-model="model.recipient" :multi="false" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber">
|
||||
<a-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<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">
|
||||
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note">
|
||||
<a-input v-model="model.note" placeholder="请输入备注"></a-input>
|
||||
</a-form-model-item>
|
||||
</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="请选择审核状态" />
|
||||
</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="使用年限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="usageYears">
|
||||
<a-input v-model="model.usageYears" placeholder="请输入使用年限"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</j-form-container>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { httpAction, getAction } from '@/api/manage'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'RmsFurnitureForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
model: {
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
approvalStatus: [
|
||||
{ required: true, message: '请选择审核状态', trigger: 'change' },
|
||||
],
|
||||
initialAudit: [
|
||||
{ required: true, message: '请选择初审状态', trigger: 'change' },
|
||||
],
|
||||
collectingUnitNumber: [
|
||||
{ required: true, message: '请选择领用单位号', trigger: 'change' },
|
||||
],
|
||||
furnitureNumber: [
|
||||
{ required: true, message: '请输入家具编号', trigger: 'blur' },
|
||||
],
|
||||
furnitureName: [
|
||||
{ required: true, message: '请输入家具名称', trigger: 'blur' },
|
||||
],
|
||||
categoryId: [
|
||||
{ required: true, message: '请输入分类号', trigger: 'blur' },
|
||||
],
|
||||
number: [
|
||||
{ required: true, message: '请输入数量', trigger: 'blur' },
|
||||
],
|
||||
unitPrice: [
|
||||
{ required: true, message: '请输入单价', trigger: 'blur' },
|
||||
],
|
||||
amount: [
|
||||
{ required: true, message: '请输入金额', trigger: 'blur' },
|
||||
],
|
||||
manufactuer: [
|
||||
{ required: true, message: '请输入厂家', trigger: 'blur' },
|
||||
],
|
||||
purchaseDate: [
|
||||
{ required: true, message: '请选择购置日期', trigger: 'change' },
|
||||
],
|
||||
recipient: [
|
||||
{ required: true, message: '请选择领用人', trigger: 'change' },
|
||||
],
|
||||
documentNumber: [
|
||||
{ required: true, message: '请输入单据号', trigger: 'blur' },
|
||||
],
|
||||
locationId: [
|
||||
{ required: true, message: '请选择存放地地址', trigger: 'change' },
|
||||
],
|
||||
usageYears: [
|
||||
{ required: true, message: '请输入使用年限', trigger: 'blur' },
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
url: {
|
||||
add: "/rms/rmsFurniture/add",
|
||||
edit: "/rms/rmsFurniture/edit",
|
||||
queryById: "/rms/rmsFurniture/queryById"
|
||||
},
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formDisabled() {
|
||||
return this.disabled
|
||||
},
|
||||
},
|
||||
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);
|
||||
},
|
||||
edit(record) {
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
},
|
||||
submitForm() {
|
||||
const that = this;
|
||||
// 触发表单验证
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add;
|
||||
method = 'post';
|
||||
} else {
|
||||
httpurl += this.url.edit;
|
||||
method = 'put';
|
||||
}
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.$emit('ok');
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<rms-furniture-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-furniture-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsFurnitureForm from './RmsFurnitureForm'
|
||||
|
||||
export default {
|
||||
name: 'RmsFurnitureModal',
|
||||
components: {
|
||||
RmsFurnitureForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,60 @@
|
|||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<rms-furniture-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-furniture-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsFurnitureForm from './RmsFurnitureForm'
|
||||
export default {
|
||||
name: 'RmsFurnitureModal',
|
||||
components: {
|
||||
RmsFurnitureForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:1000,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,338 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<a-row>
|
||||
<a-col :span="5">
|
||||
<locationaTree ref="locationaTree" :height="640" @onSelect="onSelectTree"></locationaTree>
|
||||
</a-col>
|
||||
<a-col :span="19">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="5" :lg="7" :md="8" :sm="24">
|
||||
<a-auto-complete v-model="queryParam.recipient" :dataSource="UserdataSource"
|
||||
placeholder="请选择领用人" @select="onSelect" @search="onSearch" @change="onChange" />
|
||||
</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>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<!-- <a-button @click="AddDataInstrument()" 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-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="zoom-in" @click="showHistoryModal">历史数据</a-button>
|
||||
<a-modal v-model="historyModalVisible" title="历史数据" @ok="closeHistoryModal">
|
||||
<div class="modal-content">
|
||||
<!-- 在这里显示历史数据 -->
|
||||
<div v-for="TimestampData in historyData" :key="TimestampData.id" class="container">
|
||||
<div class="left">
|
||||
<p style="font-size: 17px;">{{ TimestampData }}</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a-button type="primary" icon="download"
|
||||
@click="ExportData('仪器信息表', TimestampData)">导出</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 高级查询区域 -->
|
||||
<!-- <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>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
||||
</a-dropdown>
|
||||
</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="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDetail(record)">详情</a>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
<rms-instrument-modal ref="modalForm" @ok="modalFormOk"></rms-instrument-modal>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction } from '@/api/manage'
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import RmsInstrumentModal from './modules/RmsInstrumentModal'
|
||||
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
||||
import locationaTree from '../components/locationaTree'
|
||||
export default {
|
||||
name: 'RmsInstrumentList',
|
||||
mixins: [JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
RmsInstrumentModal,
|
||||
RmsLocationModal,
|
||||
locationaTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
dataSource: [],
|
||||
UserdataSource: [],
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '仪器编号',
|
||||
align: "center",
|
||||
dataIndex: 'instrumentNumber',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '仪器名称',
|
||||
align: "center",
|
||||
dataIndex: 'instrumentName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '领用单位号',
|
||||
align: "center",
|
||||
dataIndex: 'collectingUnitNumber_dictText',
|
||||
width: 200
|
||||
},
|
||||
|
||||
{
|
||||
title: '分类号',
|
||||
align: "center",
|
||||
dataIndex: 'categoryId',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '型号',
|
||||
align: "center",
|
||||
dataIndex: 'model',
|
||||
width: 120
|
||||
|
||||
},
|
||||
{
|
||||
title: '规格',
|
||||
align: "center",
|
||||
dataIndex: 'specifications',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
align: "center",
|
||||
dataIndex: 'unitPrice',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '厂家',
|
||||
align: "center",
|
||||
dataIndex: 'manufactuer',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '购置日期',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseDate',
|
||||
customRender: function (text) {
|
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
},
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '领用人',
|
||||
align: "center",
|
||||
dataIndex: 'recipient_dictText',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '入库时间',
|
||||
align: "center",
|
||||
dataIndex: 'entryDate',
|
||||
customRender: function (text) {
|
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
},
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '单据号',
|
||||
align: "center",
|
||||
dataIndex: 'documentNumber'
|
||||
},
|
||||
{
|
||||
title: '存放地址',
|
||||
align: "center",
|
||||
dataIndex: 'locationName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
align: "center",
|
||||
dataIndex: 'note',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
align: "center",
|
||||
dataIndex: 'approvalStatus_dictText',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '初审状态',
|
||||
align: "center",
|
||||
dataIndex: 'initialAudit_dictText',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 160,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/rms/rmsInstrument/list",
|
||||
delete: "/rms/rmsInstrument/delete",
|
||||
deleteBatch: "/rms/rmsInstrument/deleteBatch",
|
||||
exportXlsUrl: "/rms/rmsInstrument/exportXls",
|
||||
importExcelUrl: "rms/rmsInstrument/importExcel",
|
||||
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
|
||||
timestampUrl: "/rms/rmsInstrument/getTimestamp",
|
||||
},
|
||||
UserList: {},
|
||||
historyModalVisible: false, // 控制历史数据模态框的显示与隐藏
|
||||
historyData: [] // 历史数据数组,用于存储所有历史数据
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// ExportInstrumentData(fileName, TimestampData) {
|
||||
// console.log(TimestampData)
|
||||
// if (!fileName || typeof fileName != "string") {
|
||||
// fileName = "导出文件"
|
||||
// }
|
||||
// let param = this.getQueryParams();
|
||||
// if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
// param['selections'] = this.selectedRowKeys.join(",")
|
||||
// }
|
||||
// param['timestamp'] = TimestampData.timestamp
|
||||
// console.log("导出参数", param)
|
||||
// downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||
// if (!data) {
|
||||
// this.$message.warning("文件下载失败")
|
||||
// return
|
||||
// }
|
||||
// if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
// window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
||||
// } else {
|
||||
// let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||
// let link = document.createElement('a')
|
||||
// link.style.display = 'none'
|
||||
// link.href = url
|
||||
// link.setAttribute('download', fileName + '.xls')
|
||||
// document.body.appendChild(link)
|
||||
// link.click()
|
||||
// document.body.removeChild(link); //下载完成移除元素
|
||||
// window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
showHistoryModal() {
|
||||
getAction(this.url.timestampUrl).then(res => {
|
||||
console.log(res)
|
||||
this.historyData = res;
|
||||
})
|
||||
|
||||
this.historyModalVisible = true; // 显示历史数据模态框
|
||||
},
|
||||
closeHistoryModal() {
|
||||
this.historyModalVisible = false; // 关闭历史数据模态框
|
||||
},
|
||||
// AddDataInstrument() {
|
||||
// getAction("/rms/rmsIntangible/addDataInstrument").then(res => {
|
||||
// console.log(res)
|
||||
// })
|
||||
// },
|
||||
//获取用户信息
|
||||
getUserInfo() {
|
||||
getAction(this.url.userUrl).then(res => {
|
||||
this.UserList = res.result.records;
|
||||
})
|
||||
},
|
||||
onSearch(query) {
|
||||
this.UserdataSource = this.UserList.filter(user =>
|
||||
user.username.includes(query) || user.realname.includes(query)
|
||||
).map(user => ({
|
||||
value: user.username,
|
||||
text: user.realname
|
||||
}));
|
||||
},
|
||||
onSelectTree(selectedRowKeys) {
|
||||
//将其切分为字符串
|
||||
selectedRowKeys = selectedRowKeys.join(',')
|
||||
console.log(selectedRowKeys)
|
||||
this.queryParam.locationId = selectedRowKeys
|
||||
this.loadData(1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
.modal-content {
|
||||
max-height: 400px; /* 设置最大高度,根据需要进行调整 */
|
||||
overflow-y: auto; /* 添加垂直滚动条 */
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,233 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<j-form-container :disabled="formDisabled">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="领用单位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="collectingUnitNumber">
|
||||
<j-select-depart v-model="model.collectingUnitNumber" :multi="false" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="仪器编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentNumber">
|
||||
<a-input v-model="model.instrumentNumber" placeholder="请输入仪器编号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="仪器名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentName">
|
||||
<a-input v-model="model.instrumentName" placeholder="请输入仪器名称"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
|
||||
<a-input v-model="model.categoryId" placeholder="请输入分类号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="model">
|
||||
<a-input v-model="model.model" placeholder="请输入型号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
|
||||
<a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
|
||||
<a-input v-model="model.unitPrice" placeholder="请输入单价"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufactuer">
|
||||
<a-input v-model="model.manufactuer" placeholder="请输入厂家"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="购置日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purchaseDate">
|
||||
<j-date placeholder="请选择购置日期" v-model="model.purchaseDate" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="领用人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recipient">
|
||||
<j-select-user-by-dep v-model="model.recipient" :multi="false" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="入库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="entryDate">
|
||||
<j-date placeholder="请选择入库时间" v-model="model.entryDate" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber">
|
||||
<a-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<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">
|
||||
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note">
|
||||
<a-input v-model="model.note" placeholder="请输入备注"></a-input>
|
||||
</a-form-model-item>
|
||||
</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="请选择审核状态" />
|
||||
</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-row>
|
||||
</a-form-model>
|
||||
</j-form-container>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { httpAction, getAction } from '@/api/manage'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'RmsInstrumentForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
model: {
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
approvalStatus: [
|
||||
{ required: true, message: '请选择审核状态', trigger: 'change' },
|
||||
],
|
||||
initialAudit: [
|
||||
{ required: true, message: '请选择初审状态', trigger: 'change' },
|
||||
],
|
||||
collectingUnitNumber: [
|
||||
{ required: true, message: '请选择领用单位号', trigger: 'change' },
|
||||
],
|
||||
instrumentNumber: [
|
||||
{ required: true, message: '请输入家具编号', trigger: 'blur' },
|
||||
],
|
||||
instrumentName: [
|
||||
{ required: true, message: '请输入家具名称', trigger: 'blur' },
|
||||
],
|
||||
categoryId: [
|
||||
{ required: true, message: '请输入分类号', trigger: 'blur' },
|
||||
],
|
||||
unitPrice: [
|
||||
{ required: true, message: '请输入单价', trigger: 'blur' },
|
||||
],
|
||||
manufactuer: [
|
||||
{ required: true, message: '请输入厂家', trigger: 'blur' },
|
||||
],
|
||||
purchaseDate: [
|
||||
{ required: true, message: '请选择购置日期', trigger: 'change' },
|
||||
],
|
||||
recipient: [
|
||||
{ required: true, message: '请选择领用人', trigger: 'change' },
|
||||
],
|
||||
entryDate: [
|
||||
{ required: true, message: '请选择入库时间', trigger: 'change' },
|
||||
],
|
||||
documentNumber: [
|
||||
{ required: true, message: '请输入单据号', trigger: 'blur' },
|
||||
],
|
||||
locationId: [
|
||||
{ required: true, message: '请选择存放地地址', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
url: {
|
||||
add: "/rms/rmsInstrument/add",
|
||||
edit: "/rms/rmsInstrument/edit",
|
||||
queryById: "/rms/rmsInstrument/queryById"
|
||||
},
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formDisabled() {
|
||||
return this.disabled
|
||||
},
|
||||
},
|
||||
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);
|
||||
},
|
||||
edit(record) {
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
},
|
||||
submitForm() {
|
||||
const that = this;
|
||||
// 触发表单验证
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add;
|
||||
method = 'post';
|
||||
} else {
|
||||
httpurl += this.url.edit;
|
||||
method = 'put';
|
||||
}
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.$emit('ok');
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<rms-instrument-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-instrument-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsInstrumentForm from './RmsInstrumentForm'
|
||||
|
||||
export default {
|
||||
name: 'RmsInstrumentModal',
|
||||
components: {
|
||||
RmsInstrumentForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,60 @@
|
|||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<rms-instrument-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-instrument-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsInstrumentForm from './RmsInstrumentForm'
|
||||
export default {
|
||||
name: 'RmsInstrumentModal',
|
||||
components: {
|
||||
RmsInstrumentForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:1000,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,365 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<a-row>
|
||||
<a-col :span="5">
|
||||
<locationaTree ref="locationaTree" :height="640" @onSelect="onSelectTree"></locationaTree>
|
||||
</a-col>
|
||||
<a-col :span="19">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="5" :lg="7" :md="8" :sm="24">
|
||||
<a-auto-complete v-model="queryParam.recipient" :dataSource="UserdataSource"
|
||||
placeholder="请选择领用人" @select="onSelect" @search="onSearch" @change="onChange" />
|
||||
</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>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 查询区域-END -->
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<!-- <a-button @click="AddData()" 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-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="zoom-in" @click="showHistoryModal">历史数据</a-button>
|
||||
<a-modal v-model="historyModalVisible" title="历史数据" @ok="closeHistoryModal">
|
||||
<div class="modal-content">
|
||||
<!-- 在这里显示历史数据 -->
|
||||
<div v-for="TimestampData in historyData" :key="TimestampData.id" class="container">
|
||||
<div class="left">
|
||||
<p style="font-size: 17px;">{{ TimestampData }}</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a-button type="primary" icon="download" @click="ExportData('无形资产信息表', TimestampData)">导出</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 高级查询区域 -->
|
||||
<!-- <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>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
||||
</a-dropdown>
|
||||
</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="{ 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,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">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDetail(record)">详情</a>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<rms-intangible-modal ref="modalForm" @ok="modalFormOk"></rms-intangible-modal>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import RmsIntangibleModal from './modules/RmsIntangibleModal.vue'
|
||||
import { getAction } from '../../../api/manage'
|
||||
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
||||
import locationaTree from '../components/locationaTree'
|
||||
|
||||
export default {
|
||||
name: 'RmsIntangibleList',
|
||||
mixins: [JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
RmsIntangibleModal,
|
||||
RmsLocationModal,
|
||||
locationaTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
dataSource: [],
|
||||
UserdataSource: [],
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '资产编号',
|
||||
align: "center",
|
||||
dataIndex: 'intangibleNumber',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '资产名称',
|
||||
align: "center",
|
||||
dataIndex: 'intangibleName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '领用单位号',
|
||||
align: "center",
|
||||
dataIndex: 'collectingUnitNumber_dictText',
|
||||
width: 200
|
||||
},
|
||||
|
||||
{
|
||||
title: '分类号',
|
||||
align: "center",
|
||||
dataIndex: 'categoryId',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '单价',
|
||||
align: "center",
|
||||
dataIndex: 'unitPrice',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '购置日期',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseDate',
|
||||
customRender: function (text) {
|
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
},
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '专利申请号',
|
||||
align: "center",
|
||||
dataIndex: 'patentApplicationNumber',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '发明人',
|
||||
align: "center",
|
||||
dataIndex: 'inventor',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '发明名称',
|
||||
align: "center",
|
||||
dataIndex: 'inventionName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '注册日期',
|
||||
align: "center",
|
||||
dataIndex: 'registrationDate',
|
||||
customRender: function (text) {
|
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
},
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '注册机关',
|
||||
align: "center",
|
||||
dataIndex: 'registrationAuthority',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '授权公告日',
|
||||
align: "center",
|
||||
dataIndex: 'authorizationAnnouncement',
|
||||
customRender: function (text) {
|
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
},
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '批准文号',
|
||||
align: "center",
|
||||
dataIndex: 'approvalNumber',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '领用人',
|
||||
align: "center",
|
||||
dataIndex: 'recipient_dictText',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '入库时间',
|
||||
align: "center",
|
||||
dataIndex: 'entryDate',
|
||||
customRender: function (text) {
|
||||
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
},
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '单据号',
|
||||
align: "center",
|
||||
dataIndex: 'documentNumber',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '存放地址',
|
||||
align: "center",
|
||||
dataIndex: 'locationName',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
align: "center",
|
||||
dataIndex: 'note',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
align: "center",
|
||||
dataIndex: 'approvalStatus_dictText',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '初审状态',
|
||||
align: "center",
|
||||
dataIndex: 'initialAudit_dictText',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: "/rms/rmsIntangible/list",
|
||||
delete: "/rms/rmsIntangible/delete",
|
||||
deleteBatch: "/rms/rmsIntangible/deleteBatch",
|
||||
exportXlsUrl: "/rms/rmsIntangible/exportXls",
|
||||
importExcelUrl: "rms/rmsIntangible/importExcel",
|
||||
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
|
||||
timestampUrl: "/rms/rmsIntangible/getTimestamp",
|
||||
|
||||
},
|
||||
UserList: {},
|
||||
historyModalVisible: false, // 控制历史数据模态框的显示与隐藏
|
||||
historyData: [] // 历史数据数组,用于存储所有历史数据
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// AddData(){
|
||||
// getAction("/rms/rmsIntangible/addData").then(res => {
|
||||
// console.log(res)
|
||||
// });
|
||||
// },
|
||||
showHistoryModal() {
|
||||
getAction(this.url.timestampUrl).then(res => {
|
||||
console.log(res)
|
||||
this.historyData = res;
|
||||
})
|
||||
this.historyModalVisible = true; // 显示历史数据模态框
|
||||
},
|
||||
closeHistoryModal() {
|
||||
this.historyModalVisible = false; // 关闭历史数据模态框
|
||||
},
|
||||
//获取用户信息
|
||||
getUserInfo() {
|
||||
getAction(this.url.userUrl).then(res => {
|
||||
this.UserList = res.result.records;
|
||||
})
|
||||
},
|
||||
onSearch(query) {
|
||||
this.UserdataSource = this.UserList.filter(user =>
|
||||
user.username.includes(query) || user.realname.includes(query)
|
||||
).map(user => ({
|
||||
value: user.username,
|
||||
text: user.realname
|
||||
}));
|
||||
console.log(this.UserdataSource)
|
||||
},
|
||||
onSelectTree(selectedRowKeys) {
|
||||
//将其切分为字符串
|
||||
selectedRowKeys = selectedRowKeys.join(',')
|
||||
console.log(selectedRowKeys)
|
||||
this.queryParam.locationId = selectedRowKeys
|
||||
this.loadData(1)
|
||||
},
|
||||
initDictConfig() {
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.modal-content {
|
||||
max-height: 400px;
|
||||
/* 设置最大高度,根据需要进行调整 */
|
||||
overflow-y: auto;
|
||||
/* 添加垂直滚动条 */
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10px;
|
||||
}</style>
|
|
@ -0,0 +1,268 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<j-form-container :disabled="formDisabled">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="领用单位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="collectingUnitNumber">
|
||||
<j-select-depart v-model="model.collectingUnitNumber" placeholder="请输入领用单位号"
|
||||
:multi="false"></j-select-depart>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="资产编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="intangibleNumber">
|
||||
<a-input v-model="model.intangibleNumber" placeholder="请输入资产编号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="资产名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="intangibleName">
|
||||
<a-input v-model="model.intangibleName" placeholder="请输入资产名称"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
|
||||
<a-input v-model="model.categoryId" placeholder="请输入分类号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
|
||||
<a-input v-model="model.unitPrice" placeholder="请输入单价"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="购置日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purchaseDate">
|
||||
<j-date placeholder="请选择购置日期" v-model="model.purchaseDate" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="专利申请号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="patentApplicationNumber">
|
||||
<a-input v-model="model.patentApplicationNumber" placeholder="请输入专利申请号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="发明人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventor">
|
||||
<a-input v-model="model.inventor" placeholder="请输入发明人"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="发明名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventionName">
|
||||
<a-input v-model="model.inventionName" placeholder="请输入发明名称"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="注册日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="registrationDate">
|
||||
<j-date placeholder="请选择注册日期" v-model="model.registrationDate" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="注册机关" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="registrationAuthority">
|
||||
<a-input v-model="model.registrationAuthority" placeholder="请输入注册机关"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="授权公告日" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
prop="authorizationAnnouncement">
|
||||
<j-date placeholder="请选择授权公告日" v-model="model.authorizationAnnouncement" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="批准文号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalNumber">
|
||||
<a-input v-model="model.approvalNumber" placeholder="请输入批准文号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="领用人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recipient">
|
||||
<j-select-user-by-dep v-model="model.recipient" :multi="false" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="入库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="entryDate">
|
||||
<j-date placeholder="请选择入库时间" v-model="model.entryDate" style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber">
|
||||
<a-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<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">
|
||||
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note">
|
||||
<a-input v-model="model.note" placeholder="请输入备注"></a-input>
|
||||
</a-form-model-item>
|
||||
</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="请选择审核状态" />
|
||||
</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-row>
|
||||
</a-form-model>
|
||||
</j-form-container>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { httpAction, getAction } from '@/api/manage'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'RmsIntangibleForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
model: {
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
approvalStatus: [
|
||||
{ required: true, message: '请选择审核状态', trigger: 'change' },
|
||||
],
|
||||
initialAudit: [
|
||||
{ required: true, message: '请选择初审状态', trigger: 'change' },
|
||||
],
|
||||
collectingUnitNumber: [
|
||||
{ required: true, message: '请选择领用单位号', trigger: 'change' },
|
||||
],
|
||||
intangibleNumber: [
|
||||
{ required: true, message: '请输入资产编号', trigger: 'blur' },
|
||||
],
|
||||
intangibleName: [
|
||||
{ required: true, message: '请输入资产名称', trigger: 'blur' },
|
||||
],
|
||||
categoryId: [
|
||||
{ required: true, message: '请输入分类号', trigger: 'blur' },
|
||||
],
|
||||
unitPrice: [
|
||||
{ required: true, message: '请输入单价', trigger: 'blur' },
|
||||
],
|
||||
purchaseDate: [
|
||||
{ required: true, message: '请选择购置日期', trigger: 'change' },
|
||||
],
|
||||
inventionName: [
|
||||
{ required: true, message: '请输入发明名称', trigger: 'blur' },
|
||||
],
|
||||
registrationDate: [
|
||||
{ required: true, message: '请选择注册日期', trigger: 'change' },
|
||||
],
|
||||
registrationAuthority: [
|
||||
{ required: true, message: '请输入注册机关', trigger: 'blur' },
|
||||
],
|
||||
authorizationAnnouncement: [
|
||||
{ required: true, message: '请选择授权公告日', trigger: 'change' },
|
||||
],
|
||||
approvalNumber: [
|
||||
{ required: true, message: '请输入批准文号', trigger: 'blur' },
|
||||
],
|
||||
recipient: [
|
||||
{ required: true, message: '请选择领用人', trigger: 'change' },
|
||||
],
|
||||
entryDate: [
|
||||
{ required: true, message: '请选择入库时间', trigger: 'change' },
|
||||
],
|
||||
documentNumber: [
|
||||
{ required: true, message: '请输入单据号', trigger: 'blur' },
|
||||
],
|
||||
locationId: [
|
||||
{ required: true, message: '请选择存放地地址', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
url: {
|
||||
add: "/rms/rmsIntangible/add",
|
||||
edit: "/rms/rmsIntangible/edit",
|
||||
queryById: "/rms/rmsIntangible/queryById"
|
||||
},
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formDisabled() {
|
||||
return this.disabled
|
||||
},
|
||||
},
|
||||
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);
|
||||
},
|
||||
edit(record) {
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
},
|
||||
submitForm() {
|
||||
const that = this;
|
||||
// 触发表单验证
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add;
|
||||
method = 'post';
|
||||
} else {
|
||||
httpurl += this.url.edit;
|
||||
method = 'put';
|
||||
}
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.$emit('ok');
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<rms-intangible-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-intangible-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsIntangibleForm from './RmsIntangibleForm.vue'
|
||||
|
||||
export default {
|
||||
name: 'RmsIntangibleModal',
|
||||
components: {
|
||||
RmsIntangibleForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,60 @@
|
|||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<rms-intangible-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-intangible-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsIntangibleForm from './RmsIntangibleForm.vue'
|
||||
export default {
|
||||
name: 'RmsIntangibleModal',
|
||||
components: {
|
||||
RmsIntangibleForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:1000,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,150 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 表单结构 -->
|
||||
<div class="page">
|
||||
<a-row>
|
||||
<a-col :span="5" class="tree">
|
||||
<locationaTree ref="locationaTree" :height="500" @onSelect="onSelect"></locationaTree>
|
||||
</a-col>
|
||||
<a-col :span="19" class="table">
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" style="padding-bottom: 15px;">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" style="float: right;">新增</a-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<a-button key="1" @click="batchDel"><a-icon type="delete" />删除</a-button>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<div style="padding-top: 15px;">
|
||||
<a-table ref="table" size="middle" :scroll="{ x: 600, y: 500 }" bordered rowKey="id" :columns="columns"
|
||||
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
|
||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
|
||||
<rms-location-modal ref="modalForm" @ok="modalFormOk"></rms-location-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import RmsLocationModal from './modules/RmsLocationModal'
|
||||
import locationaTree from '../components/locationaTree'
|
||||
|
||||
export default {
|
||||
name: 'RmsLocationList',
|
||||
mixins: [JeecgListMixin, mixinDevice],
|
||||
components: {
|
||||
RmsLocationModal,
|
||||
locationaTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
description: '存放地表管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '地址ID',
|
||||
align: "center",
|
||||
dataIndex: 'id'
|
||||
},
|
||||
{
|
||||
title: '存放地址',
|
||||
align: "center",
|
||||
dataIndex: 'locationName'
|
||||
},
|
||||
{
|
||||
title: '排序号',
|
||||
align: "center",
|
||||
dataIndex: 'sortNumber',
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 147,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
isorter: {
|
||||
column: 'sortNumber',
|
||||
order: 'asc'
|
||||
},
|
||||
url: {
|
||||
list: "/rms/rmsLocation/list",
|
||||
delete: "/rms/rmsLocation/delete",
|
||||
deleteBatch: "/rms/rmsLocation/deleteBatch",
|
||||
exportXlsUrl: "/rms/rmsLocation/exportXls",
|
||||
importExcelUrl: "rms/rmsLocation/importExcel",
|
||||
|
||||
},
|
||||
dictOptions: {},
|
||||
superFieldList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 重写底层JeecgListMixin.js的方法
|
||||
// 如果有自定义默认排序必须重写此方法,才能解决重置排序的问题
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
//分页、排序、筛选变化时触发
|
||||
console.log(pagination)
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter.column = sorter.field;
|
||||
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
|
||||
// update-begin--Author:ciei Date:20230504 for:重置排序
|
||||
if (sorter.order === undefined) {
|
||||
this.isorter.column = 'sortNumber';
|
||||
this.isorter.order = 'asc';
|
||||
}
|
||||
// update-end--Author:ciei Date:20230504 for:重置排序
|
||||
}
|
||||
this.ipagination = pagination;
|
||||
this.loadData();
|
||||
},
|
||||
onSelect(selectedRowKeys) {
|
||||
//将其切分为字符串
|
||||
selectedRowKeys = selectedRowKeys.join(',')
|
||||
console.log(selectedRowKeys)
|
||||
this.queryParam.id = selectedRowKeys
|
||||
this.loadData(1)
|
||||
},
|
||||
modalFormOk() {
|
||||
this.$refs.locationaTree.getTreeData()
|
||||
// 新增/修改 成功时,重载列表
|
||||
this.loadData();
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.page {
|
||||
height: 600px;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,128 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<j-form-container :disabled="formDisabled">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="存放地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationName">
|
||||
<a-input v-model="model.locationName" placeholder="请输入存放地址"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="父级存放地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parentLocationId">
|
||||
<a-cascader :options="treeData" placeholder="请选择父级存放地址" @change="onChange"
|
||||
:changeOnSelect="true"></a-cascader>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="排序号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sortNumber">
|
||||
<a-input v-model="model.sortNumber" placeholder="请输入排序号"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</j-form-container>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { httpAction, getAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'RmsLocationForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
model: {
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
locationName: [{ required: true, message: '请输入存放地址', trigger: 'blur' },],
|
||||
},
|
||||
url: {
|
||||
add: "/rms/rmsLocation/add",
|
||||
edit: "/rms/rmsLocation/edit",
|
||||
queryById: "/rms/rmsLocation/queryById"
|
||||
},
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getCascader?type=0'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formDisabled() {
|
||||
return this.disabled
|
||||
},
|
||||
},
|
||||
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;
|
||||
}
|
||||
});
|
||||
},
|
||||
add() {
|
||||
this.edit(this.modelDefault);
|
||||
},
|
||||
edit(record) {
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
},
|
||||
onChange(value) {
|
||||
this.model.parentLocationId = value[value.length - 1];
|
||||
},
|
||||
submitForm() {
|
||||
const that = this;
|
||||
// 触发表单验证
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add;
|
||||
method = 'post';
|
||||
} else {
|
||||
httpurl += this.url.edit;
|
||||
method = 'put';
|
||||
}
|
||||
httpAction(httpurl, this.model, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.$emit('ok');
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<rms-location-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-location-form>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsLocationForm from './RmsLocationForm'
|
||||
|
||||
export default {
|
||||
name: 'RmsLocationModal',
|
||||
components: {
|
||||
RmsLocationForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
.drawer-footer{
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,60 @@
|
|||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<rms-location-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-location-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import RmsLocationForm from './RmsLocationForm'
|
||||
export default {
|
||||
name: 'RmsLocationModal',
|
||||
components: {
|
||||
RmsLocationForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:'',
|
||||
width:800,
|
||||
visible: false,
|
||||
disableSubmit: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.add();
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.visible=true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.realForm.edit(record);
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.realForm.submitForm();
|
||||
},
|
||||
submitCallback(){
|
||||
this.$emit('ok');
|
||||
this.visible = false;
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,141 @@
|
|||
<template>
|
||||
<div :style="{ height: String(height) + 'px' }" class="tree">
|
||||
<div class="title"><span>地址树</span><span><a-icon type="redo" @click="getTreeData"
|
||||
style="float: right;margin-right: 20px;" /></span></div>
|
||||
<div class="tree-border"></div>
|
||||
<div class="tree-content">
|
||||
<div v-if="isLoading" class="example">
|
||||
<a-spin tip="加载中..."></a-spin>
|
||||
</div>
|
||||
<a-tree :default-expanded-keys="this.keySecond" :tree-data="treeData" @select="onSelect" v-if="treeData.length > 0 && !isLoading">
|
||||
<template #title="{ key: treeKey, title }">
|
||||
<span>{{ title }}</span>
|
||||
</template>
|
||||
</a-tree>
|
||||
<a-empty v-if="treeData.length === 0 && !isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getAction } from '@/api/manage'
|
||||
export default {
|
||||
name: 'locationaTree',
|
||||
props: {
|
||||
// 图表高度
|
||||
height: {
|
||||
type: Number,
|
||||
default: 530
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showLine: true,
|
||||
showIcon: false,
|
||||
treeData: [],
|
||||
getTreeUrl: '/rms/rmsLocation/getTree',
|
||||
isLoading: false,
|
||||
keySecond: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//生成的时候默认请求树结构数据
|
||||
this.getTreeData();
|
||||
},
|
||||
methods: {
|
||||
// onSelect函数,当节点被选中时调用
|
||||
onSelect(selectedKeys, info) {
|
||||
if (selectedKeys.length === 0) {
|
||||
this.$emit('onSelect', []);
|
||||
return;
|
||||
}
|
||||
const selectedKey = selectedKeys[0];
|
||||
// 查找选中的节点
|
||||
const findNode = (key, nodes) => {
|
||||
for (let node of nodes) {
|
||||
if (node.key === key) {
|
||||
return node;
|
||||
}
|
||||
if (node.children) {
|
||||
const found = findNode(key, node.children);
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const selectedNode = findNode(selectedKey, this.treeData);
|
||||
const childKeys = this.collectChildKeys(selectedNode);
|
||||
childKeys.push(selectedKey);
|
||||
//回调到父组件
|
||||
this.$emit('onSelect', childKeys);
|
||||
},
|
||||
//只收集本层和下层的key
|
||||
collectChildKeys(node, keys = []) {
|
||||
if (!node) {
|
||||
return keys;
|
||||
}
|
||||
// 如果节点有children,获取其子节点的key
|
||||
if (node.children) {
|
||||
for (let child of node.children) {
|
||||
keys.push(child.key);
|
||||
for (let subChild of child.children) {
|
||||
keys.push(subChild.key);
|
||||
}
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
},
|
||||
getTreeData() {
|
||||
this.isLoading = true;
|
||||
getAction(this.getTreeUrl, {}).then(res => {
|
||||
if (res.success) {
|
||||
this.isLoading = false;
|
||||
this.treeData = res.result;
|
||||
for (let node of this.treeData) {
|
||||
this.keySecond.push(node.key);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.tree {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
|
||||
.title {
|
||||
line-height: 30px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 树边框 */
|
||||
.tree-border {
|
||||
border-top: 1px solid #cdcdcd;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.tree-content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
|
||||
.example {
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 20px;
|
||||
padding: 30px 50px;
|
||||
margin: 20px 0;
|
||||
top: 50%;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -4,7 +4,7 @@
|
|||
<div id="loader"></div>
|
||||
<div class="loader-section section-left"></div>
|
||||
<div class="loader-section section-right"></div>
|
||||
<div class="load_title">正在登录 计科院ERP系统,请耐心等待</div>
|
||||
<div class="load_title">正在登录 计算机学院资源管理系统,请耐心等待</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
20
yarn.lock
20
yarn.lock
|
@ -4573,6 +4573,14 @@ ecc-jsbn@~0.1.1:
|
|||
jsbn "~0.1.0"
|
||||
safer-buffer "^2.1.0"
|
||||
|
||||
echarts@^5.4.3:
|
||||
version "5.4.3"
|
||||
resolved "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz#f5522ef24419164903eedcfd2b506c6fc91fb20c"
|
||||
integrity sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==
|
||||
dependencies:
|
||||
tslib "2.3.0"
|
||||
zrender "5.4.4"
|
||||
|
||||
ee-first@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||
|
@ -11019,6 +11027,11 @@ tsconfig-paths@^3.9.0:
|
|||
minimist "^1.2.0"
|
||||
strip-bom "^3.0.0"
|
||||
|
||||
tslib@2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
|
||||
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
|
||||
|
||||
tslib@^1.10.0, tslib@^1.9.0:
|
||||
version "1.13.0"
|
||||
resolved "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
|
||||
|
@ -12081,3 +12094,10 @@ yorkie@^2.0.0:
|
|||
is-ci "^1.0.10"
|
||||
normalize-path "^1.0.0"
|
||||
strip-indent "^2.0.0"
|
||||
|
||||
zrender@5.4.4:
|
||||
version "5.4.4"
|
||||
resolved "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz#8854f1d95ecc82cf8912f5a11f86657cb8c9e261"
|
||||
integrity sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==
|
||||
dependencies:
|
||||
tslib "2.3.0"
|
||||
|
|
Loading…
Reference in New Issue