页面优化

This commit is contained in:
BianLzhaoMin 2024-05-06 15:21:37 +08:00
parent 3501c258f7
commit 83f78e85c8
5 changed files with 1040 additions and 1076 deletions

View File

@ -306,22 +306,22 @@
</template>
<script>
import {
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
} from '@/api/system/dict/type'
import {
} from '@/api/system/dict/type'
import {
getLeaseAuditListAll,
getUnitData,
getProData,
deleteTask,
} from '@/api/claimAndRefund/receive'
} from '@/api/claimAndRefund/receive'
export default {
export default {
// name: "ReceiveApply",
dicts: ['sys_normal_disable'],
data() {
@ -375,8 +375,7 @@
unitId: this.queryParams.unitId,
projectId: this.queryParams.proId,
keyWord: this.queryParams.keyWord,
startTime:
this.queryParams.time && this.queryParams.time[0],
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
types: this.queryParams.types,
souceBy: 0,
@ -517,11 +516,11 @@
})
},
},
}
}
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
}
</style>

View File

@ -434,23 +434,23 @@
</template>
<script>
import {
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
} from '@/api/system/dict/type'
import {
} from '@/api/system/dict/type'
import {
getLeaseManageListAll,
getUnitData,
getProData,
getLeaseListAll,
} from '@/api/claimAndRefund/receive'
import { getInfo } from '@/api/login'
import vueEasyPrint from 'vue-easy-print'
export default {
} from '@/api/claimAndRefund/receive'
import { getInfo } from '@/api/login'
import vueEasyPrint from 'vue-easy-print'
export default {
// name: "ReceiveManage",
data() {
return {
@ -558,8 +558,7 @@
unitId: this.queryParams.unitId,
projectId: this.queryParams.proId,
keyWord: this.queryParams.keyword,
startTime:
this.queryParams.time && this.queryParams.time[0],
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
types: this.queryParams.types,
souceBy: 0,
@ -666,10 +665,7 @@
this.leaseApplyDetails = res.rows[0].leaseApplyDetails
this.leaseApplyData = res.rows[0]
console.log(
'this.leaseApplyData ============',
this.leaseApplyData,
)
console.log('this.leaseApplyData ============', this.leaseApplyData)
},
//
print() {
@ -755,11 +751,11 @@
immediate: true,
},
},
}
}
</script>
<style lang="scss" scoped>
.print {
.print {
.title {
text-align: center;
font-weight: 600;
@ -783,9 +779,9 @@
display: flex;
justify-content: space-between;
}
}
::v-deep.el-table .fixed-width .el-button--mini {
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
}
</style>

View File

@ -1,13 +1,6 @@
<template>
<div class="app-container" id="newDevicesCode">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
@ -20,19 +13,8 @@
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -47,78 +29,27 @@
>新增</el-button>
</el-col>-->
<el-col :span="1.5">
<el-button
type="success"
plain
size="mini"
icon="el-icon-back"
@click="jumpList"
>新购验收管理</el-button
>
<el-button type="success" plain size="mini" icon="el-icon-back" @click="jumpList">新购验收管理</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="typeList"
@selection-change="handleSelectionChange"
>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="机具类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="specificationType"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购时间"
align="center"
prop="purchaseTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购数量"
align="center"
prop="purchaseNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="验收数量"
align="center"
prop="checkNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="绑定数量"
align="center"
prop="bindNum"
:show-overflow-tooltip="true"
>
<el-table-column label="机具类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
<el-table-column label="采购时间" align="center" prop="purchaseTime" :show-overflow-tooltip="true" />
<el-table-column label="采购数量" align="center" prop="purchaseNum" :show-overflow-tooltip="true" />
<el-table-column label="验收数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
<el-table-column label="绑定数量" align="center" prop="bindNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.bindNum > 0">{{
scope.row.bindNum
}}</span>
<span v-if="scope.row.bindNum > 0">{{ scope.row.bindNum }}</span>
<span v-else>0</span>
</template>
</el-table-column>
<el-table-column
label="是否为固定资产"
align="center"
prop="fixCode"
:show-overflow-tooltip="true"
>
<el-table-column label="是否为固定资产" align="center" prop="fixCode" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.fixCode == '0'"></span>
<span v-if="scope.row.fixCode == '1'"></span>
@ -270,9 +201,9 @@ import {
getBindCodeDetails
} from '@/api/store/newBuy'
import { getTypeList } from '@/api/store/warehousing'
import { getListByMaType } from '@/api/store/tools'
import { number } from 'echarts'
import { getTypeList } from '@/api/store/warehousing'
import { getListByMaType } from '@/api/store/tools'
import { number } from 'echarts'
export default {
name: 'NewDevicesCode',
@ -475,11 +406,51 @@ export default {
assetsCode: '',
fixCode: this.form.fixCode,
}
this.codeList.push(obj)
}
} else {
this.$modal.msgError('编码后缀范围输入格式不正确')
}
}
},
mounted() {
const taskId = this.$route.query && this.$route.query.taskId
this.taskId = taskId
// console.log(this.taskId)
/** 提交按钮 */
submitForm: function () {
// console.log(this.codeList)
if (this.form.fixCode == 0) {
if (this.hasDuplicateField(this.codeList, 'assetsCode')) {
this.$modal.msgError('固定资产编码不能为空')
return false
}
}
if (this.codeList.length == 0) {
this.$modal.msgError('无新增编码绑定')
} else {
const maCodeSet = new Set()
let hasDuplicates = false
for (const item of this.codeList) {
const maCode = item.maCode
if (maCodeSet.has(maCode)) {
hasDuplicates = true
break
}
maCodeSet.add(maCode)
}
console.log('codeList:', this.codeList)
if (hasDuplicates) {
this.$modal.msgError('编码绑定失败,存在重复编码,请重新输入')
return //
}
editPurchaseMacode(this.codeList).then(response => {
console.log(this.codeList)
if (response.data && response.data.length > 0) {
this.codeList = response.data
this.$modal.msgError('编码绑定失败,存在重复编码,请重新输入')
} else {
this.$modal.msgSuccess('编码绑定成功')
this.open = false
this.getList()
}
})
@ -542,13 +513,13 @@ export default {
</script>
<style scoped>
.redColor {
.redColor {
color: red;
}
}
</style>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
}
</style>

View File

@ -124,23 +124,35 @@
<el-table
v-loading="loading"
:data="roleList"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="角色编号" prop="roleId" width="120" />
<el-table-column
label="角色编号"
prop="roleId"
width="120"
align="center"
/>
<el-table-column
align="center"
label="角色名称"
prop="roleName"
:show-overflow-tooltip="true"
width="150"
/>
<el-table-column
align="center"
label="权限字符"
prop="roleKey"
:show-overflow-tooltip="true"
width="150"
/>
<el-table-column label="显示顺序" prop="roleSort" width="100" />
<el-table-column
align="center"
label="显示顺序"
prop="roleSort"
width="100"
/>
<el-table-column label="状态" align="center" width="100">
<template slot-scope="scope">
<el-switch
@ -161,11 +173,7 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" align="center">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button
size="mini"
@ -384,7 +392,7 @@
</template>
<script>
import {
import {
listRole,
getRole,
delRole,
@ -393,13 +401,13 @@
dataScope,
changeRoleStatus,
deptTreeSelect,
} from '@/api/system/role'
import {
} from '@/api/system/role'
import {
treeselect as menuTreeselect,
roleMenuTreeselect,
} from '@/api/system/menu'
} from '@/api/system/menu'
export default {
export default {
name: 'Role',
dicts: ['sys_normal_disable'],
data() {
@ -505,13 +513,13 @@
/** 查询角色列表 */
getList() {
this.loading = true
listRole(
this.addDateRange(this.queryParams, this.dateRange),
).then((response) => {
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(
(response) => {
this.roleList = response.rows
this.total = response.total
this.loading = false
})
},
)
},
/** 查询菜单树结构 */
getMenuTreeselect() {
@ -555,9 +563,7 @@
handleStatusChange(row) {
let text = row.status === '0' ? '启用' : '停用'
this.$modal
.confirm(
'确认要"' + text + '""' + row.roleName + '"角色吗?',
)
.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?')
.then(function () {
return changeRoleStatus(row.roleId, row.status)
})
@ -639,29 +645,23 @@
if (type == 'menu') {
let treeList = this.menuOptions
for (let i = 0; i < treeList.length; i++) {
this.$refs.menu.store.nodesMap[
treeList[i].id
].expanded = value
this.$refs.menu.store.nodesMap[treeList[i].id].expanded =
value
}
} else if (type == 'dept') {
let treeList = this.deptOptions
for (let i = 0; i < treeList.length; i++) {
this.$refs.dept.store.nodesMap[
treeList[i].id
].expanded = value
this.$refs.dept.store.nodesMap[treeList[i].id].expanded =
value
}
}
},
// /
handleCheckedTreeNodeAll(value, type) {
if (type == 'menu') {
this.$refs.menu.setCheckedNodes(
value ? this.menuOptions : [],
)
this.$refs.menu.setCheckedNodes(value ? this.menuOptions : [])
} else if (type == 'dept') {
this.$refs.dept.setCheckedNodes(
value ? this.deptOptions : [],
)
this.$refs.dept.setCheckedNodes(value ? this.deptOptions : [])
}
},
//
@ -763,9 +763,7 @@
handleDelete(row) {
const roleIds = row.roleId || this.ids
this.$modal
.confirm(
'是否确认删除所选择的数据项?',
)
.confirm('是否确认删除所选择的数据项?')
.then(function () {
return delRole(roleIds)
})
@ -786,5 +784,5 @@
)
},
},
}
}
</script>

View File

@ -38,7 +38,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://112.29.103.165:21626`, //线上环境-重庆
// target: `http://112.29.103.165:21624`,//线上环境-宁夏 打包前放开数据大屏的路由
target: `http://192.168.0.14:21624`, //测试环境
// target: `http://192.168.0.14:21624`, //测试环境
// target: `http://1.12.248.179:23028`,//线上环境-南网
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
@ -46,7 +46,7 @@ module.exports = {
// target: `http://10.40.92.8:8080`, //超
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://10.40.92.74:8080`,//旭/
// target: `http://10.40.92.153:8080`, //帅
target: `http://10.40.92.140:28080`, //帅
// target: `http://10.40.92.14:28080`, //福
//******** 注意事项 ********* */