Browse Source

页面优化

master
xuhuajiao 1 month ago
parent
commit
af4548c888
  1. 2
      src/main.js
  2. 62
      src/views/archivesManage/archivesList/archivesAnjuan/index.vue
  3. 69
      src/views/archivesManage/archivesList/archivesJuannei/index.vue
  4. 11
      src/views/archivesManage/archivesList/index.vue
  5. 1
      src/views/archivesManage/archivesList/mixins/archives.js
  6. 1
      src/views/archivesManage/archivesList/module/packing/index.vue
  7. 6
      src/views/components/AccessDoor.vue
  8. 6
      src/views/components/WarehouseWarning.vue
  9. 63
      src/views/components/category/PreviewForm.vue
  10. 7
      src/views/home.vue
  11. 2
      vue.config.js

2
src/main.js

@ -81,6 +81,8 @@ Vue.prototype.$x2js = new X2js() // 创建x2js对象,挂到vue原型上
Vue.config.productionTip = false
Vue.prototype.$bus = new Vue()
new Vue({
el: '#app',
router,

62
src/views/archivesManage/archivesList/archivesAnjuan/index.vue

@ -27,6 +27,24 @@
<i slot="prefix" class="iconfont icon-zhuangtai-fanbai" />
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-select
v-if="!recycleMain.isRecycle"
v-model="ctgValue"
class="filter-item"
filterable
placeholder="请选择档案类目筛选"
clearable
@click="getIntellClassify()"
@change="getTableList()"
@clear="handleCtgClear"
>
<el-option
v-for="item in ctgOptions"
:key="item.dicCode"
:label="item.dicName"
:value="item.dicCode"
/>
</el-select>
<el-input v-model="anjuanQuery[anjuanInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 220px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList">
<el-select slot="prepend" v-model="anjuanInputSelect" style="width: 90px" @change="querySelect(anjuanInputSelect)">
<el-option
@ -209,6 +227,7 @@ import { header, form } from '@crud/crud'
import { mapGetters } from 'vuex'
import { archivesCrud } from '../mixins/archives'
import { FetchIsExistBorrow, FetchAddArchivesWaitRegister } from '@/api/archivesManage/lendManage'
import { getDicts } from '@/api/archivesConfig/dict'
import PreviewForm from '@/views/components/category/PreviewForm'
import ArchivesInfo from '../module/archivesInfo/index'
import Packing from '../module/packing/index'
@ -275,7 +294,9 @@ export default {
lengingVisible: false, //
codeLoading: false,
printDialogVisible: false, //
printLabelList: [] //
printLabelList: [], //
ctgValue: '',
ctgOptions: []
}
},
computed: {
@ -354,8 +375,28 @@ export default {
this.query.queryType = this.stateOptions[0].value
},
mounted() {
this.getIntellClassify()
},
methods: {
//
handleCtgClear() {
this.ctgValue = '' //
this.getTableList() //
},
getIntellClassify() {
//
if (this.ctgOptions.length > 0) return
getDicts().then(data => {
if (data) {
const res = data.filter(item => {
item.checked = false
return item.dicCode === 'DALM'
})
this.ctgOptions = res[0]?.childMenus || [] //
}
})
},
//
onPrint(res) {
this.codeLoading = true
@ -410,10 +451,11 @@ export default {
// /query
resetQuery() {
this.ctgValue = ''
if (this.selectedCategory.isType === 5) {
this.queryOption = [
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '号' }
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '号' }
// { value: 'responsibleby', label: '' },
// { value: 'docNo', label: ' ' },
// { value: 'barcode', label: '' },
@ -422,7 +464,7 @@ export default {
]
} else {
this.queryOption = [
{ value: 'queryTitle', label: '名' },
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '档号' }
// { value: 'archiveCtgNo', label: '' },
// { value: 'barcode', label: '' },
@ -444,17 +486,23 @@ export default {
})
},
// list
// list
getTableList() {
// this.query.queryType = null
this.query.queryTitle = ''
this.query.archiveNo = ''
this.query.archiveCtgNo = ''
// /archiveCtgNo
// this.query.archiveCtgNo = ''
this.query.responsibleby = ''
this.query.docNo = ''
this.query.documentNo = ''
this.query.barcode = ''
this.query.folderLocation = ''
this.query.tempNo = ''
// ctgValuearchiveCtgNo
this.query.archiveCtgNo = this.ctgValue || ''
switch (this.anjuanInputSelect) {
case 'queryTitle': //
this.query.queryTitle = this.anjuanQuery[this.anjuanInputSelect]
@ -517,7 +565,7 @@ export default {
this.$refs.table.toggleRowSelection(row)
this.selections = this.crud.selections
this.isAnjuan = this.crud.selections.length !== 1
this.$emit('getJnInAjBtnState', this.isAnjuan)
this.$bus.$emit('updateAnjuanState', this.isAnjuan) //
this.$emit('getSelections', row, null)
},
//
@ -525,7 +573,7 @@ export default {
this.selections = selection
// -btn-
this.isAnjuan = selection.length !== 1
this.$emit('getJnInAjBtnState', this.isAnjuan)
this.$bus.$emit('updateAnjuanState', this.isAnjuan) //
this.$emit('getSelections', row, selection)
},
//

69
src/views/archivesManage/archivesList/archivesJuannei/index.vue

@ -7,7 +7,7 @@
</div> -->
<div v-if="!recycleMain.isRecycle" class="archives-crud">
<!-- 新增 -->
<el-button v-if="selectedCategory.isType !== 4" size="mini" :disabled="isAnjuan" icon="el-icon-plus" @click="handleForm('add','档案',2)">新增</el-button>
<el-button v-if="selectedCategory.isType !== 4" size="mini" :disabled="localIsAnjuan" icon="el-icon-plus" @click="handleForm('add','档案',2)">新增</el-button>
<!-- 修改 -->
<el-button size="mini" icon="el-icon-edit" :disabled="selections.length !== 1" @click="handleForm('edit','档案',null)">修改</el-button>
<!-- 删除btn 多选 -->
@ -28,6 +28,24 @@
<i slot="prefix" class="iconfont icon-zhuangtai-fanbai" />
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-select
v-if="!recycleMain.isRecycle"
v-model="ctgValue"
class="filter-item"
filterable
placeholder="请选择档案类目筛选"
clearable
@click="getIntellClassify()"
@change="getTableList()"
@clear="handleCtgClear"
>
<el-option
v-for="item in ctgOptions"
:key="item.dicCode"
:label="item.dicName"
:value="item.dicCode"
/>
</el-select>
<el-input v-model="juanneiQuery[juanneiInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 220px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList">
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 90px" @change="querySelect(juanneiInputSelect)">
<el-option
@ -114,12 +132,11 @@
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
<el-table-column v-if="!recycleMain.isRecycle" label="标签" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<!-- <el-table-column v-if="!recycleMain.isRecycle" label="标签" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<template slot-scope="scope">
<!-- 未绑 / 已绑 -->
<span :class="['row-state', 'row-binding', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '已绑': '未绑' }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column v-if="!recycleMain.isRecycle" label="装盒" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<!-- state-active 已装/已入/已借/已绑 -->
<template slot-scope="scope">
@ -199,6 +216,7 @@
import { header, form } from '@crud/crud'
import { mapGetters } from 'vuex'
import { archivesCrud } from '../mixins/archives'
import { getDicts } from '@/api/archivesConfig/dict'
import PreviewForm from '@/views/components/category/PreviewForm'
import ArchivesInfo from '../module/archivesInfo/index'
import BindingTagDlg from '@/views/components/BindingTagDlg'
@ -250,8 +268,8 @@ export default {
junneiData: [],
juanneiQuery: {},
queryOption: [
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '号' }
{ value: 'queryTitle', label: '名' },
{ value: 'archiveNo', label: '号' }
// { value: 'responsibleby', label: '' },
// { value: 'documentNo', label: ' ' },
// { value: 'barcode', label: '' },
@ -270,7 +288,10 @@ export default {
],
codeLoading: false,
printDialogVisible: false, //
printLabelList: [] //
printLabelList: [], //
ctgValue: '',
ctgOptions: [],
localIsAnjuan: true
}
},
computed: {
@ -284,7 +305,8 @@ export default {
tableDisplayFields(val) {
this.doLayout()
},
isAnjuan: function(newValue, oldValue) {
isAnjuan(newVal, oldVal) {
console.log('卷内组件 isAnjuan 同步更新:', oldVal, '→', newVal)
},
fixedStatusBar: function(newValue, oldValue) {
},
@ -303,8 +325,36 @@ export default {
this.selections = []
},
mounted() {
this.getIntellClassify()
this.$bus.$on('updateAnjuanState', (isAnjuan) => {
console.log('卷内组件通过事件总线接收:', isAnjuan)
this.localIsAnjuan = isAnjuan //
})
},
beforeDestroy() {
//
this.$bus.$off('updateAnjuanState')
},
methods: {
//
handleCtgClear() {
this.ctgValue = '' //
this.getTableList() //
},
getIntellClassify() {
//
if (this.ctgOptions.length > 0) return
getDicts().then(data => {
if (data) {
const res = data.filter(item => {
item.checked = false
return item.dicCode === 'DALM'
})
this.ctgOptions = res[0]?.childMenus || [] //
}
})
},
//
onPrint(res) {
this.codeLoading = true
@ -382,6 +432,9 @@ export default {
this.query.documentNo = ''
this.query.barcode = ''
this.query.folderLocation = ''
this.query.archiveCtgNo = this.ctgValue || ''
switch (this.juanneiInputSelect) {
case 'queryTitle': //
this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect]

11
src/views/archivesManage/archivesList/index.vue

@ -13,7 +13,7 @@
<el-tree ref="archivesTree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick" />
</div>
</div>
<!-- <div v-if="!isRecycle" class="container-left left-tree-item">
<div v-if="!isRecycle" class="container-left left-tree-item">
<span class="right-top-line" />
<span class="left-bottom-line" />
<div class="tree-title">智能检索</div>
@ -43,7 +43,7 @@
</template>
</el-tree>
</div>
</div> -->
</div>
</el-col>
<!-- 档案管理列表 -->
@ -170,6 +170,10 @@ export default {
isdel: function(newValue, oldValue) {
},
isRecycle: function(newValue, oldValue) {
},
isAnjuan(newValue, oldValue) {
console.log('父组件 isAnjuan 真实变化:', oldValue, '→', newValue)
// isAnjuan
}
},
mounted() {
@ -322,6 +326,7 @@ export default {
},
// -btn-
getJnInAjBtnState(data) {
console.log('getJnInAjBtnState', data)
this.isAnjuan = data
},
getAjInProjectBtnState(data) {
@ -790,7 +795,7 @@ export default {
<style lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
.tree-scroll{
height: calc(100vh - 235px);
height: calc(100vh - 610px);
overflow-y: scroll;
overflow-x: hidden;
}

1
src/views/archivesManage/archivesList/mixins/archives.js

@ -302,6 +302,7 @@ export const archivesCrud = {
} else if (isAnOrJuan === 2) {
if (this.recycleMain.anjuanSelection[item.fieldName]) {
this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection))
console.log(' this.$refs.previewForm.addOrUpdateForm', this.$refs.previewForm.addOrUpdateForm)
}
}
})

1
src/views/archivesManage/archivesList/module/packing/index.vue

@ -303,6 +303,7 @@ export default {
this.$message.success('装盒成功!')
this.packingVisible = false
this.$emit('close-dialog')
this.crud.refresh()
this.tableData = []
this.caseQuery[this.inputSelect] = ''
})

6
src/views/components/AccessDoor.vue

@ -69,11 +69,11 @@ export default {
},
methods: {
toPage() {
if (this.roles.includes('admin') || this.roles.includes('logManage:list')) {
if (this.roles.includes('admin') || this.roles.includes('RunningLog:list')) {
this.$router.push({
name: 'LogManage',
name: 'RunningLog',
params: {
locationIndex: 3
locationIndex: 1
}
})
} else {

6
src/views/components/WarehouseWarning.vue

@ -64,11 +64,11 @@ export default {
},
methods: {
toPage() {
if (this.roles.includes('admin') || this.roles.includes('logManage:list')) {
if (this.roles.includes('admin') || this.roles.includes('RunningLog:list')) {
this.$router.push({
name: 'LogManage',
name: 'RunningLog',
params: {
locationIndex: 2
locationIndex: 0
}
})
} else {

63
src/views/components/category/PreviewForm.vue

@ -59,10 +59,31 @@
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-table ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="id" :tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<!-- 新增检索输入框 -->
<div class="table-search" style="margin-bottom: 16px; display: flex; justify-content: flex-start;">
<el-input
v-model="searchKeyword"
placeholder="请输入字典名称/代码/说明进行检索"
clearable
style="width: 300px;"
@input="handleTableSearch"
/>
</div>
<!-- 表格绑定筛选后的数据 -->
<el-table
ref="popoverTable"
:data="filteredPopoverTableData"
highlight-current-row
row-key="id"
:tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}"
style="width: 100%;"
height="calc(100vh - 400px)"
@selection-change="handleSelectionChange"
@row-click="clickRowHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="dicName" label="字典名称" />
<el-table-column prop="dicCode" label="字典代码" />
<el-table-column prop="dicCode" label="字典代码" width="100" />
<el-table-column prop="dicExplain" label="内容说明" />
</el-table>
</div>
@ -143,7 +164,33 @@ export default {
label: node.dicName,
children: node.childMenus
}
},
searchKeyword: '', //
selectedRows: [] //
}
},
computed: {
//
filteredPopoverTableData() {
const keyword = this.searchKeyword.trim().toLowerCase()
if (!keyword) {
return this.popoverTableData
}
const filterTree = (treeData) => {
return treeData.filter(item => {
const isMatch =
item.dicName?.toLowerCase().includes(keyword) ||
item.dicCode?.toLowerCase().includes(keyword) ||
item.dicExplain?.toLowerCase().includes(keyword)
if (item.childMenus && item.childMenus.length > 0) {
const filteredChildren = filterTree(item.childMenus)
item.childMenus = filteredChildren
return isMatch || filteredChildren.length > 0
}
return isMatch
})
}
return filterTree(JSON.parse(JSON.stringify(this.popoverTableData))) //
}
},
watch: {
@ -172,6 +219,9 @@ export default {
// }
},
methods: {
handleTableSearch() {
// searchKeyword
},
//
// getNode(tree, dicName) {
// for (let i = 0; i < tree.length; i++) {
@ -454,6 +504,7 @@ export default {
},
handleClose(done) {
this.popoverVisible = false
this.searchKeyword = ''
done()
}
}
@ -500,4 +551,12 @@ export default {
line-height: 30px;
}
}
.table-search{
::v-deep .el-input--small .el-input__inner{
border: 1px solid #339cff;
background-color: transparent;
color: #fff;
}
}
</style>

7
src/views/home.vue

@ -27,7 +27,7 @@
</h3>
<div class="home-floor-tab">
<!-- :class="{ 'active-floor': floorEnvIndex == 0 }" @click="changeFloorEnvTab(0)" -->
<p :class="{ 'active-floor': floorEnvIndex == 0 || floorEnvIndex == 1 }">3</p>
<p :class="{ 'active-floor': floorEnvIndex == 0 || floorEnvIndex == 1 }">1</p>
</div>
<!-- 环境数据轮播容器隐藏指示器分屏展示温湿度 + 其他指标 -->
<el-carousel
@ -123,13 +123,14 @@
</p>
</h3>
<div class="home-floor-tab">
<p :class="{ 'active-floor': floorIndex == 0 }" @click="changeFloorTab(0)">3</p>
<p :class="{ 'active-floor': floorIndex == 0 }" @click="changeFloorTab(0)">1</p>
</div>
<el-carousel ref="carouselRef" trigger="click" :interval="4000" indicator-position="none" height="110px" arrow="never" @change="handleChange">
<el-carousel-item>
<div class="warehouse-tab">
<ul class="warehouse-nav">
<li @click="changeActiveTab(1,0)">
<!-- @click="changeActiveTab(1,0)" -->
<li>
<span />
<p>全景图</p>
</li>

2
vue.config.js

@ -6,7 +6,7 @@ function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title // 网址标题
const port = 8013 // 端口配置
const port = 7090 // 端口配置
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
// hash 模式下可使用

Loading…
Cancel
Save