fix: 数据看板动态获取

This commit is contained in:
cjp 2023-12-05 13:36:51 +08:00
parent 9866b87da2
commit 5020d6954c
12 changed files with 1041 additions and 12 deletions

View File

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

View File

@ -82,12 +82,12 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL ='http://huli.zjzhiliao.com/jxjgdapi/' //金林湾测试线上
// axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
axios.defaults.baseURL = 'http://192.168.34.221:30002/' //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.221:30002/' //郭圣雄本地
// axios.defaults.baseURL ='http://192.168.34.221:30012/' //郭圣雄本地
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
// axios.defaults.baseURL ='http://101.43.164.214:11111/' //广西百色项目
axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址

View File

@ -5,7 +5,7 @@
font-size: 24px;
}
.el-dialog__title,.pageTitle{
font-size: 15px;
font-size: 16px;
font-weight: 500;
position: relative;
padding-left: 13px;

View File

@ -314,6 +314,7 @@ export default {
const query = '?&headquartersSn=' + this.$store.state.userInfo.headquartersSn; //
const loginUrl = `${baseUrl}/login${query}`; //
window.open(loginUrl, '_self')
this.$router.go();
}
// this.$router.push('/')
window._paq.push(['trackEvent', '点击', '退出登录', '退出登录'])

View File

@ -129,10 +129,13 @@ import account from './account'
import changeTheme from './changeTheme'
import message from './message'
import QRCode from 'qrcodejs2'
import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
export default {
props: ['titleName', 'showR'],
data() {
return {
newBigScreenUrl: null,
headerShow,
LOGO_white: LOGO_white,
headerName: '',
@ -167,10 +170,15 @@ export default {
}
}
},
beforeDestroy() {
this.newBigScreen = null
console.log("当前数据看板地址",this.newBigScreen)
},
created() {
this.company = COMPANY
console.log('this.company', this.company)
console.log('COMPANY', COMPANY)
this.getProjectDetail()
this.loginData = JSON.parse(localStorage.getItem('systemInfo'))
// console.log('',this.loginData)\
},
@ -179,7 +187,6 @@ export default {
this.systemInfo = JSON.parse(localStorage.getItem('systemInfo'))
}
console.log('进入页面显示的企业头部名称', this.systemInfo)
this.headerName = this.systemInfo.platformName
if (this.$route.path.indexOf('equipmentCenter/') != -1) {
this.headerName += ' - 设备中台'
@ -203,6 +210,19 @@ export default {
},
methods: {
//()
getProjectDetail() {
this.newBigScreen = null
let data = {
projectSn: this.$store.state.projectSn,
};
getProjectDetail(data).then((res) => {
if (res.result) {
this.newBigScreen = res.result.newBigScreen
console.log("数据看板地址",this.newBigScreen)
}
});
},
closeAudio() {
this.isShowAudio = false
},
@ -313,17 +333,12 @@ export default {
}
},
toOverview2() {
if (this.company == 'syhy') {
if (this.newBigScreen != null) {
console.log("当前跳转链接",this.newBigScreen)
//--------------------
this.jumpToken = localStorage.getItem('jumpToken')
window.open('http://101.43.164.214:45022/#/large?token=' + this.jumpToken, '_self') //
window.open(this.newBigScreen + '?token=' + this.jumpToken, '_self')
// window.open('http://192.168.34.226:8081/#/large?token=' + this.jumpToken, "_self")//token
} else if (this.company == 'jxwjj') {
this.jumpToken = localStorage.getItem('jumpToken')
window.open('http://183.249.224.118:9003/#/large?token=' + this.jumpToken, '_self') //
} else if (this.company == 'gxbs') {
this.jumpToken = localStorage.getItem('jumpToken')
window.open('http://101.43.164.214:11113/#/large?token=' + this.jumpToken, '_self') //广西
} else {
//--------------------
@ -346,6 +361,39 @@ export default {
window.location.href = routeUrl.href
window._paq.push(['trackEvent', '点击', '数据看板', '进入数据看板'])
}
// if (this.company == 'syhy') {
// //--------------------
// this.jumpToken = localStorage.getItem('jumpToken')
// window.open('http://101.43.164.214:45022/#/large?token=' + this.jumpToken, '_self') //
// // window.open('http://192.168.34.226:8081/#/large?token=' + this.jumpToken, "_self")//token
// } else if (this.company == 'jxwjj') {
// this.jumpToken = localStorage.getItem('jumpToken')
// window.open('http://183.249.224.118:9003/#/large?token=' + this.jumpToken, '_self') //
// } else if (this.company == 'gxbs') {
// this.jumpToken = localStorage.getItem('jumpToken')
// window.open('http://101.43.164.214:11113/#/large?token=' + this.jumpToken, '_self') //广西
// } else {
// //--------------------
// //
// let arr = this.$store.state.userInfo.menuAuthority.moduleList
// let arr2 = []
// arr.forEach(element => {
// if (element.moduleType == 4) {
// arr2.push(element)
// return
// }
// })
// // 访
// if (!arr2.length) {
// return this.$message.warning('')
// }
// let routeUrl = this.$router.resolve({
// path: arr2[0].modulePath
// })
// window.location.href = routeUrl.href
// window._paq.push(['trackEvent', '', '', ''])
// }
},
toOverview3() {
if (COMPANY == 'shenbai') {

View File

@ -2238,6 +2238,56 @@ const routes2 = [
'@/views/projectFront/waterMixStation/productData.vue',
], resolve),
},
// 智慧梁场
{
path: '/project/smartBeamField/planManage',
name: '智慧梁场-计划管理',
component: (resolve) =>
require([
'@/views/projectFront/smartBeamField/planManage.vue',
], resolve),
},
{
path: '/project/smartBeamField/beamManage',
name: '智慧梁场-梁管理',
component: (resolve) =>
require([
'@/views/projectFront/smartBeamField/beamManage.vue',
], resolve),
},
{
path: '/project/smartBeamField/storageAreaManage',
name: '智慧梁场-存梁区管理',
component: (resolve) =>
require([
'@/views/projectFront/smartBeamField/storageAreaManage.vue',
], resolve),
},
{
path: '/project/smartBeamField/pedestalManage',
name: '智慧梁场-副梁台座管理',
component: (resolve) =>
require([
'@/views/projectFront/smartBeamField/pedestalManage.vue',
], resolve),
},
{
path: '/project/smartBeamField/processList',
name: '智慧梁场-工序列表',
component: (resolve) =>
require([
'@/views/projectFront/smartBeamField/processList.vue',
], resolve),
},
{
path: '/project/smartBeamField/productManage',
name: '智慧梁场-生产管理',
component: (resolve) =>
require([
'@/views/projectFront/smartBeamField/productManage.vue',
], resolve),
},
],
},

View File

@ -0,0 +1,436 @@
<template>
<div class="plan-manage">
<div class="plan-content">
<div class="left-plan">
<div class="input-box">
<el-input placeholder="请输入桥段" suffix-icon="el-icon-search" v-model="input1" size="small" class="plan-search"> </el-input>
<!-- <div class="add-icon">
<img src="@/assets/images/carPosition/add.png" alt="" />
</div> -->
</div>
<div class="bridge-section">
<vue-scroll>
<div class="section-list">
<div
class="section-item"
v-for="(item, index) in bridgeSectionList"
:key="item.id"
:class="{ active: activeBuildIndex == index }"
@click="changeBuildFn(item, index)"
>
<div class="bridge-title">{{ item.name }}</div>
<!-- <div class="bridge-tool">
<img @click.stop="editBuildFn(item)" src="@/assets/images/icon-edit.png" style="margin-right:16px" class="icon" />
<img @click.stop="deleteBuildFn(item)" src="@/assets/images/icon-delete.png" class="icon" />
</div> -->
</div>
</div>
</vue-scroll>
</div>
<div class="add-icon"></div>
</div>
<div class="right-plan">
<div class="fullHeight whiteBlock">
<div style="padding: 15px 15px 0">
<p class="pageTitle">梁列表</p>
<el-form :inline="true" ref="searchForm" :model="searchForm" size="medium">
<el-form-item label="梁号">
<el-input v-model="searchForm.institutionName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="梁型" style="margin-left:40px">
<el-select v-model="searchForm.status" placeholder="请选择" clearable>
<el-option v-for="(item, index) in beamTypeOption" :key="index" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" style="margin-left:40px">
<el-select v-model="searchForm.status" placeholder="请选择" clearable>
<el-option v-for="(item, index) in nameOptions" :key="index" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="getList">{{ $t('message.energyManage.waybill.query') }}</el-button>
<el-button type="warning" plain @click="refresh">{{ $t('message.deviceManage.refresh') }}</el-button>
<!-- <el-button type="primary" size="medium" @click="add">新增</el-button> -->
</el-form-item>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<el-table class="tables" :data="['', '']">
<el-table-column type="index" label="序号" align="center" width="60">
<!-- <template slot-scope="scope">
<div>
{{scope.row}}
</div>
</template> -->
</el-table-column>
<el-table-column prop="institutionalAddress" align="center" label="梁号" width="80"></el-table-column>
<el-table-column prop="institutionalPhone" align="center" label="所属桥段"></el-table-column>
<el-table-column prop="remark" align="center" label="梁板类型"></el-table-column>
<el-table-column prop="remark" align="center" label="制梁状态"></el-table-column>
<el-table-column prop="remark" align="center" label="计划制梁时间"></el-table-column>
<el-table-column prop="remark" align="center" label="计划架梁时间"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<div class="table-btn">
<div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>二维码</span>
</div>
<!-- <div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>开始生产</span>
</div> -->
<div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>详情</span>
</div>
<!-- <div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>编辑</span>
</div>
<div @click="deleteDev(scope.row)" class="operationText">
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
<span>删除</span>
</div> -->
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagerBox"
@size-change="SizeChange"
@current-change="CurrentChange"
:current-page="pagInfo.pageNo"
:page-sizes="$store.state.PAGESIZRS"
:page-size="pagInfo.pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(pagInfo.total)"
background
></el-pagination>
</div>
<el-dialog :modal-append-to-body="false" @close="close" :title="title" :visible.sync="dialogShow" width="667px">
<div class="dialog_content">
<el-form size="medium" ref="addEditForm" :model="addEditForm" :rules="addEditRules" label-width="120px" class="dialogFormBox">
<el-form-item label="机构名称" prop="institutionName">
<el-input v-model="addEditForm.institutionName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="机构地址" prop="institutionalAddress">
<el-input v-model="addEditForm.institutionalAddress" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="机构电话" prop="institutionalPhone">
<el-input v-model="addEditForm.institutionalPhone" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="addEditForm.remark" placeholder="请输入"></el-input>
</el-form-item>
<div class="dialog-footer">
<el-button class="cancleBtn" @click="dialogShow = false" icon="el-icon-circle-close" size="medium"
>{{ $t('message.deviceManage.cancel') }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium"
>{{ $t('message.deviceManage.save') }}
</el-button>
</div>
</el-form>
</div>
</el-dialog>
</div>
</div>
</div>
</div>
</template>
<script>
import {
addgtMaterialTestingInstitutionApi,
deletgtMaterialTestingInstitutionApi,
editgtMaterialTestingInstitutionApi,
gettgtMaterialTestingInstitutionApi
} from '@/assets/js/api/materialManagement.js'
export default {
mounted() {
this.getList()
},
data() {
return {
beamTypeOption: [
{
label: '梁型1',
value: 1
},
{
label: '梁型2',
value: 2
},
{
label: '梁型3',
value: 3
}
],
nameOptions: [
{
label: '合格',
value: 1
},
{
label: '不合格',
value: 2
},
{
label: '未判定',
value: 3
}
],
bridgeSectionList: [
{
name: '桥段1',
id: 1
},
{
name: '桥段2',
id: 2
},
{
name: '桥段3',
id: 3
},
{
name: '桥段4',
id: 4
}
],
input1: '', //
currentBridgeInfo: '', //item
activeBuildIndex: '', //
// *************
title: '',
dialogShow: false,
pagInfo: {
pageNo: 1, //
pageSize: 10, //
total: 0 //
},
List: [],
addEditForm: {
institutionName: '',
institutionalAddress: '',
institutionalPhone: '',
remark: ''
},
addEditRules: {
institutionName: [
{
required: true,
message: '必填',
trigger: 'blur'
}
]
},
searchForm: {
institutionName: ''
}
}
},
methods: {
//
handle() {
console.log('打开弹窗')
},
changeBuildFn(item, index) {
this.activeBuildIndex = index
this.currentBridgeInfo = item
},
//
editBuildFn(item) {
console.log('编辑桥段', item)
},
//
deleteBuildFn(item) {
console.log('删除桥段', item)
},
// **************************
getList() {
gettgtMaterialTestingInstitutionApi({
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
projectSn: this.$store.state.projectSn,
institutionName: this.searchForm.institutionName
}).then(result => {
if (result.success) {
this.List = result.result.records
this.pagInfo.total = result.result.total
}
})
},
add() {
this.title = '新增机构'
this.dialogShow = true
this.close()
},
edit(obj) {
this.title = '编辑机构'
this.dialogShow = true
this.addEditForm = JSON.parse(JSON.stringify(obj))
},
submit() {
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate(valid => {
if (valid) {
if (this.title == '新增机构') {
addgtMaterialTestingInstitutionApi(params).then(result => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
} else if (this.title === '编辑机构') {
editgtMaterialTestingInstitutionApi(params).then(result => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
}
this.dialogShow = false
} else {
return false
}
})
},
deleteDev(obj) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deletgtMaterialTestingInstitutionApi({ id: obj.id }).then(res => {
if (res.success) {
this.getList()
this.$message({
type: 'success',
message: '删除成功!'
})
} else {
this.$message({
type: 'error',
message: res.message
})
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
close() {
this.addEditForm = {}
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate()
})
},
SizeChange(val) {
this.pagInfo.pageSize = val
this.getList()
},
CurrentChange(val) {
this.pagInfo.pageNo = val
this.getList()
},
refresh() {
this.searchForm = {}
this.pagInfo.pageNo = 1 //
this.pagInfo.pageSize = 10 //
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
.plan-manage {
width: 100%;
height: 100%;
.plan-content {
display: flex;
width: 100%;
height: 100%;
.left-plan {
width: 17%;
margin-right: 1%;
background: #fff;
.input-box {
display: flex;
margin: 20px 0 0px 20px;
.plan-search {
width: 90%;
margin: 0 auto;
}
.add-icon {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
cursor: pointer;
border: 1px solid #c7d4f8;
img {
width: 75%;
height: 75%;
}
}
}
.bridge-section {
width: 100%;
height: 75%;
.section-list {
width: 100%;
margin-top: 5%;
.section-item {
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
&.active {
background: #c7d4f8;
color: #5181f6;
border-left: 4px solid #5181f6;
.bridge-title {
margin-left: 0px;
}
}
.bridge-title {
font-size: 14px;
margin-left: 4px;
}
.bridge-tool {
display: flex;
.icon {
width: 15px;
height: 15px;
cursor: pointer;
}
}
}
}
}
}
.right-plan {
width: 82%;
background: #fff;
}
}
}
.table-btn {
display: flex;
justify-content: center;
}
</style>

View File

@ -0,0 +1,6 @@
<template>
<div>制梁台座管理</div>
</template>
<script lang="ts" setup></script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,471 @@
<template>
<div class="plan-manage">
<div class="plan-content">
<div class="left-plan">
<div class="input-box">
<el-input placeholder="请输入桥段" suffix-icon="el-icon-search" v-model="input1" size="small" class="plan-search"> </el-input>
<div class="add-icon">
<img src="@/assets/images/carPosition/add.png" alt="" />
</div>
</div>
<div class="bridge-section">
<vue-scroll>
<div class="section-list">
<div
class="section-item"
v-for="(item, index) in bridgeSectionList"
:key="item.id"
:class="{ active: activeBuildIndex == index }"
@click="changeBuildFn(item, index)"
>
<div class="bridge-title">{{ item.name }}</div>
<div class="bridge-tool">
<img @click.stop="editBuildFn(item)" src="@/assets/images/icon-edit.png" style="margin-right:16px" class="icon" />
<img @click.stop="deleteBuildFn(item)" src="@/assets/images/icon-delete.png" class="icon" />
</div>
</div>
</div>
</vue-scroll>
</div>
<div class="add-icon"></div>
</div>
<div class="right-plan">
<div class="fullHeight whiteBlock">
<div style="padding: 15px 15px 0">
<p class="pageTitle">梁列表</p>
<el-form :inline="true" ref="searchForm" :model="searchForm" size="medium">
<el-form-item label="梁号">
<el-input v-model="searchForm.institutionName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="梁型" style="margin-left:40px">
<el-select v-model="searchForm.status" placeholder="请选择" clearable>
<el-option v-for="(item, index) in beamTypeOption" :key="index" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" style="margin-left:40px">
<el-select v-model="searchForm.status" placeholder="请选择" clearable>
<el-option v-for="(item, index) in nameOptions" :key="index" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="getList">{{ $t('message.energyManage.waybill.query') }}</el-button>
<el-button type="warning" plain @click="refresh">{{ $t('message.deviceManage.refresh') }}</el-button>
<el-button type="primary" size="medium" @click="add">新增</el-button>
</el-form-item>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<el-table class="tables" :data="['', '']">
<el-table-column type="index" label="序号" align="center" width="60">
<!-- <template slot-scope="scope">
<div>
{{scope.row}}
</div>
</template> -->
</el-table-column>
<el-table-column prop="institutionalAddress" align="center" label="梁号" width="80"></el-table-column>
<el-table-column prop="institutionalPhone" align="center" label="所属桥段"></el-table-column>
<el-table-column prop="remark" align="center" label="梁板类型"></el-table-column>
<el-table-column prop="remark" align="center" label="制梁状态"></el-table-column>
<el-table-column prop="remark" align="center" label="计划制梁时间"></el-table-column>
<el-table-column prop="remark" align="center" label="计划架梁时间"></el-table-column>
<el-table-column label="操作" align="center" width="470">
<template slot-scope="scope">
<div class="table-btn">
<div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>二维码</span>
</div>
<div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>开始生产</span>
</div>
<div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>详情</span>
</div>
<div @click="edit(scope.row)" class="operationText" style="margin-right: 30px">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>编辑</span>
</div>
<div @click="deleteDev(scope.row)" class="operationText">
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
<span>删除</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagerBox"
@size-change="SizeChange"
@current-change="CurrentChange"
:current-page="pagInfo.pageNo"
:page-sizes="$store.state.PAGESIZRS"
:page-size="pagInfo.pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(pagInfo.total)"
background
></el-pagination>
</div>
<el-dialog :modal-append-to-body="false" @close="close" :title="title" :visible.sync="dialogShow" width="667px">
<div class="dialog_content">
<el-form size="medium" ref="addEditForm" :model="addEditForm" :rules="addEditRules" label-width="120px" class="dialogFormBox">
<el-form-item label="梁号" prop="institutionName">
<el-input v-model="addEditForm.institutionName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="所属桥段" prop="institutionalAddress">
<el-input v-model="addEditForm.institutionalAddress" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="梁板类型" prop="institutionalPhone">
<el-input v-model="addEditForm.institutionalPhone" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="制梁状态">
<el-select v-model="searchForm.status" placeholder="请选择" clearable>
<el-option v-for="(item, index) in beamTypeOption" :key="index" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="计划制梁时间">
<el-date-picker
v-model="dateSelect"
type="datetime"
placeholder="请选择时间"
:range-separator="$t('message.energyManage.to')"
:start-placeholder="$t('message.energyManage.start')"
:end-placeholder="$t('message.energyManage.end')"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划驾梁时间">
<el-date-picker
v-model="dateSelect"
type="datetime"
placeholder="请选择时间"
:range-separator="$t('message.energyManage.to')"
:start-placeholder="$t('message.energyManage.start')"
:end-placeholder="$t('message.energyManage.end')"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item label="跨" prop="remark">
<el-input v-model="addEditForm.remark" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="幅">
<el-select v-model="searchForm.status" placeholder="请选择" clearable>
<el-option v-for="(item, index) in beamTypeOption" :key="index" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
<div class="dialog-footer">
<el-button class="cancleBtn" @click="dialogShow = false" icon="el-icon-circle-close" size="medium"
>{{ $t('message.deviceManage.cancel') }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium"
>生成二维码
</el-button>
</div>
</el-form>
</div>
</el-dialog>
</div>
</div>
</div>
</div>
</template>
<script>
import {
addgtMaterialTestingInstitutionApi,
deletgtMaterialTestingInstitutionApi,
editgtMaterialTestingInstitutionApi,
gettgtMaterialTestingInstitutionApi
} from '@/assets/js/api/materialManagement.js'
export default {
mounted() {
this.getList()
},
data() {
return {
dateSelect: '',
beamTypeOption: [
{
label: '梁型1',
value: 1
},
{
label: '梁型2',
value: 2
},
{
label: '梁型3',
value: 3
}
],
nameOptions: [
{
label: '合格',
value: 1
},
{
label: '不合格',
value: 2
},
{
label: '未判定',
value: 3
}
],
bridgeSectionList: [
{
name: '桥段1',
id: 1
},
{
name: '桥段2',
id: 2
},
{
name: '桥段3',
id: 3
},
{
name: '桥段4',
id: 4
}
],
input1: '', //
currentBridgeInfo: '', //item
activeBuildIndex: '', //
// *************
title: '',
dialogShow: false,
pagInfo: {
pageNo: 1, //
pageSize: 10, //
total: 0 //
},
List: [],
addEditForm: {
institutionName: '',
institutionalAddress: '',
institutionalPhone: '',
remark: ''
},
addEditRules: {
institutionName: [
{
required: true,
message: '必填',
trigger: 'blur'
}
]
},
searchForm: {
institutionName: ''
}
}
},
methods: {
//
handle() {
console.log('打开弹窗')
},
changeBuildFn(item, index) {
this.activeBuildIndex = index
this.currentBridgeInfo = item
},
//
editBuildFn(item) {
console.log('编辑桥段', item)
},
//
deleteBuildFn(item) {
console.log('删除桥段', item)
},
// **************************
getList() {
gettgtMaterialTestingInstitutionApi({
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
projectSn: this.$store.state.projectSn,
institutionName: this.searchForm.institutionName
}).then(result => {
if (result.success) {
this.List = result.result.records
this.pagInfo.total = result.result.total
}
})
},
add() {
this.title = '新增梁'
this.dialogShow = true
this.close()
},
edit(obj) {
this.title = '编辑机构'
this.dialogShow = true
this.addEditForm = JSON.parse(JSON.stringify(obj))
},
submit() {
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate(valid => {
if (valid) {
if (this.title == '新增梁') {
addgtMaterialTestingInstitutionApi(params).then(result => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
} else if (this.title === '编辑机构') {
editgtMaterialTestingInstitutionApi(params).then(result => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
}
this.dialogShow = false
} else {
return false
}
})
},
deleteDev(obj) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deletgtMaterialTestingInstitutionApi({ id: obj.id }).then(res => {
if (res.success) {
this.getList()
this.$message({
type: 'success',
message: '删除成功!'
})
} else {
this.$message({
type: 'error',
message: res.message
})
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
close() {
this.addEditForm = {}
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate()
})
},
SizeChange(val) {
this.pagInfo.pageSize = val
this.getList()
},
CurrentChange(val) {
this.pagInfo.pageNo = val
this.getList()
},
refresh() {
this.searchForm = {}
this.pagInfo.pageNo = 1 //
this.pagInfo.pageSize = 10 //
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
.plan-manage {
width: 100%;
height: 100%;
.plan-content {
display: flex;
width: 100%;
height: 100%;
.left-plan {
width: 17%;
margin-right: 1%;
background: #fff;
.input-box {
display: flex;
margin: 20px 0 0px 20px;
.plan-search {
width: 80%;
margin-right: 5%;
}
.add-icon {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
cursor: pointer;
border: 1px solid #c7d4f8;
img {
width: 75%;
height: 75%;
}
}
}
.bridge-section {
width: 100%;
height: 75%;
.section-list {
width: 100%;
margin-top: 5%;
.section-item {
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
&.active {
background: #c7d4f8;
color: #5181f6;
border-left: 4px solid #5181f6;
.bridge-title {
margin-left: 0px;
}
}
.bridge-title {
font-size: 14px;
margin-left: 4px;
}
.bridge-tool {
display: flex;
.icon {
width: 15px;
height: 15px;
cursor: pointer;
}
}
}
}
}
}
.right-plan {
width: 82%;
background: #fff;
}
}
}
.table-btn {
display: flex;
justify-content: center;
}
</style>

View File

@ -0,0 +1,6 @@
<template>
<div>工序列表</div>
</template>
<script lang="ts" setup></script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,5 @@
<template>
<div>生产管理</div>
</template>
<script lang="ts" setup></script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,6 @@
<template>
<div>存梁区管理</div>
</template>
<script lang="ts" setup></script>
<style lang="scss" scoped></style>