fix: BUG修改
This commit is contained in:
parent
fe4a17c375
commit
77ea063990
@ -7,6 +7,7 @@ export const addCompanyFileApi = data => post('xmgl/companyFile/add', data); //
|
||||
export const editCompanyFileApi = data => post('xmgl/companyFile/edit', data); //编辑企业文件资料信息
|
||||
export const deleteCompanyFileApi = data => post('xmgl/companyFile/delete', data); //删除企业文件资料信息
|
||||
export const getCompanyFileListApi = data => post('xmgl/companyFile/list', data); //分页查询企业的文件资料记录
|
||||
export const getMyCompanyFileListApi = data => post('xmgl/companyFile/my/list', data); //分页查询企业的文件资料记录
|
||||
export const updateFileDownloadNumApi = data => post('xmgl/companyFile/updateFileDownloadNum', data); //增加文件资料下载次数
|
||||
export const updateFileDownloadNameApi = data => post('xmgl/companyFile/getFile', data); // 更改文件名后同步下载后的文件名
|
||||
export const updateFileDownloadReNameApi = params => get('xmgl/upload/getRenameFile', params); // 下载后同步文件名
|
||||
|
||||
@ -84,7 +84,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
@ -93,7 +93,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:9809/'//测试地址
|
||||
axios.defaults.baseURL = 'http://47.93.215.234:9809/'//测试地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:19814/'//测试地址
|
||||
|
||||
|
||||
|
||||
@ -48,24 +48,24 @@ export default new Vuex.Store({
|
||||
PAGESIZRS: [10, 20, 30, 50],
|
||||
// UPLOADURL:' http://101.43.164.214:11111/upload/image/',// 百色
|
||||
// FILEURL:' http://101.43.164.214:11111/image/',// 百色
|
||||
UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
|
||||
FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
|
||||
WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地)
|
||||
// UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
|
||||
// FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
|
||||
// WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地)
|
||||
// UPLOADURL:'http://jxj.zhgdyun.com:15551/upload/image',//测试
|
||||
// FILEURL:'http://jxj.zhgdyun.com:15551/image/',//测试
|
||||
|
||||
// BASEURL: baseUrl
|
||||
// ? baseUrl
|
||||
// : window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
// UPLOADURL:
|
||||
// window.location.protocol +
|
||||
// "//" +
|
||||
// window.location.host +
|
||||
// "/upload/image", //正式环境
|
||||
// FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
BASEURL: baseUrl
|
||||
? baseUrl
|
||||
: window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
UPLOADURL:
|
||||
window.location.protocol +
|
||||
"//" +
|
||||
window.location.host +
|
||||
"/upload/image", //正式环境
|
||||
FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
// WORKFLOWURL: 'http://182.90.224.237:9811/#/workspace/forms',//测试平台工作流地址
|
||||
// WORKFLOWURL: 'http://182.90.224.237:9814/#/workspace/forms',//鞍钢平台工作流地址
|
||||
// WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址
|
||||
WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// BASEURL: baseUrl
|
||||
// ? baseUrl
|
||||
|
||||
@ -228,7 +228,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getCompanyFileListApi,
|
||||
getMyCompanyFileListApi,
|
||||
addCompanyFileApi,
|
||||
deleteCompanyFileApi,
|
||||
editCompanyFileApi,
|
||||
@ -374,7 +374,7 @@ export default {
|
||||
data.pageNo = this.pageNo
|
||||
data.pageSize = this.pageSize
|
||||
data.companySn = this.$store.state.userInfo.sn
|
||||
getCompanyFileListApi(data).then((res) => {
|
||||
getMyCompanyFileListApi(data).then((res) => {
|
||||
console.log(res)
|
||||
this.tableData = res.result.page.records
|
||||
this.total = res.result.page.total
|
||||
|
||||
@ -120,7 +120,12 @@ export default {
|
||||
let data = this.searchForm
|
||||
data.pageNo = this.pageNo
|
||||
data.pageSize = this.pageSize
|
||||
data.companySn = this.$store.state.userInfo.headquartersSn
|
||||
if([2,3,4,7].includes(this.$store.state.userInfo.accountType)){
|
||||
data.companySn = this.$store.state.userInfo.sn
|
||||
}
|
||||
if([5,6,10].includes(this.$store.state.userInfo.accountType)){
|
||||
data.projectSn = this.$store.state.userInfo.sn
|
||||
}
|
||||
getCompanyFileListApi(data).then((res) => {
|
||||
console.log(res)
|
||||
this.tableData = res.result.page.records
|
||||
|
||||
@ -313,7 +313,8 @@ export default {
|
||||
hours >= 0 && hours <= 9 ? (hours = '0' + hours) : ''
|
||||
minutes >= 0 && minutes <= 9 ? (minutes = '0' + minutes) : ''
|
||||
seconds >= 0 && seconds <= 9 ? (seconds = '0' + seconds) : ''
|
||||
var timer = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||
// var timer = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds // 获取至当前的时间
|
||||
var timer = year + '-' + month + '-' + day + ' ' + '23:59:59'
|
||||
var timer2 = year + '-' + month + '-' + day + ' ' + '00:00:00'
|
||||
this.dateRangeArr = [timer2, timer]
|
||||
this.formInline.startTime = this.dateRangeArr[0]
|
||||
|
||||
@ -367,10 +367,7 @@
|
||||
<el-select
|
||||
v-model="addEditForm.driverWorkerId"
|
||||
filterable
|
||||
multiple
|
||||
collapse-tags
|
||||
:placeholder="$t('message.deviceManage.placeholder_select')"
|
||||
@change="changeDriverFn"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in appWorkerList"
|
||||
@ -635,7 +632,7 @@ export default {
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.carManage.required"),
|
||||
trigger: "blur",
|
||||
trigger: "change",
|
||||
},
|
||||
// {required: true, message: this.$t('message.carManage.required'), trigger: "change"}
|
||||
],
|
||||
@ -765,19 +762,6 @@ export default {
|
||||
// // 使用正则表达式匹配只允许输入英文和数字
|
||||
// this.addEditForm.carNumber = this.addEditForm.carNumber.replace(/[^a-zA-Z0-9]/g, '')
|
||||
// },
|
||||
changeDriverFn() {
|
||||
// let arr1=[],arr2=[]
|
||||
// for (let index = 0; index < this.appWorkerList.length; index++) {
|
||||
// const element = this.appWorkerList[index];
|
||||
// if(this.addEditForm.driverWorkerId.indexOf(element.id)){
|
||||
// arr1.push(element.phoneNumber)
|
||||
// arr2.push(element.idCard)
|
||||
// }
|
||||
// }
|
||||
// console.log(arr1)
|
||||
// this.addEditForm.driverTelephone=arr1.join(',')
|
||||
// this.addEditForm.driverTelephone=arr2.join(',')
|
||||
},
|
||||
handle(type, show) {
|
||||
//打开弹窗前的统一处理
|
||||
this.Popup = {
|
||||
@ -811,11 +795,11 @@ export default {
|
||||
.split(",")
|
||||
.map(String);
|
||||
}
|
||||
if (typeof obj.driverWorkerId === "string" && obj.driverWorkerId != "") {
|
||||
this.addEditForm.driverWorkerId = obj.driverWorkerId
|
||||
.split(",")
|
||||
.map(String);
|
||||
}
|
||||
// if (typeof obj.driverWorkerId === "string" && obj.driverWorkerId != "") {
|
||||
// this.addEditForm.driverWorkerId = obj.driverWorkerId
|
||||
// .split(",")
|
||||
// .map(String);
|
||||
// }
|
||||
// if(obj.uDevId){
|
||||
// this.addEditForm.uDevId = obj.uDevId.split(",")
|
||||
// }
|
||||
@ -872,12 +856,12 @@ export default {
|
||||
if (this.addEditForm.alarmPushWorkerId) {
|
||||
params.alarmPushWorkerId = this.addEditForm.alarmPushWorkerId.join(",");
|
||||
}
|
||||
if (this.addEditForm.driverWorkerId) {
|
||||
params.driverWorkerId = this.addEditForm.driverWorkerId.join(",");
|
||||
}
|
||||
// if (this.addEditForm.driverWorkerId) {
|
||||
// params.driverWorkerId = this.addEditForm.driverWorkerId.join(",");
|
||||
// }
|
||||
if (this.addEditForm.driverTelephone) {
|
||||
if (!checkPhone(this.addEditForm.driverTelephone)) {
|
||||
this.$message.error("请输入正确的负责人电话");
|
||||
this.$message.error("请输入正确的电话号码格式");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,10 +62,14 @@
|
||||
prop="account"
|
||||
:label="$t('message.personnelAccess.Labid')"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
prop="account"
|
||||
label="组织名称"
|
||||
></el-table-column>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{ getItemByIdInTree(scope.row.xzProjectOrgId,"") }}</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
prop="workerName"
|
||||
:label="$t('message.personnelAccess.Labname')"
|
||||
@ -423,7 +427,7 @@ import {
|
||||
} from "@/assets/js/api/laborPerson";
|
||||
import { deleteSystemUserApi } from "@/assets/js/api/account";
|
||||
export default {
|
||||
mounted() {
|
||||
created() {
|
||||
this.getRoleList();
|
||||
this.getMachineList();
|
||||
this.getAllVideo();
|
||||
@ -434,6 +438,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
groupName: "",
|
||||
defaultExpandArr: [],
|
||||
// 对应的字段
|
||||
defaultProps: {
|
||||
@ -542,6 +547,46 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// getItemByIdInTree(value,path=""){
|
||||
// for(var i=0;i<this.treeList.length;i++){
|
||||
// let tempPath = path
|
||||
// tempPath = `${tempPath ? tempPath + '/' : tempPath}${this.treeList[i].name}` // 避免出现在最前面的/
|
||||
// if(this.treeList[i].id == value){
|
||||
// return tempPath
|
||||
// } else if(this.treeList[i].children){
|
||||
// let reuslt = this.getItemByIdInTree(this.treeList[i].children,value,tempPath)
|
||||
// if(reuslt){
|
||||
// return reuslt
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// groupNameFilter(val){
|
||||
// console.log(val)
|
||||
// this.treeList.map(item => {
|
||||
// this.filterNameFunc(val,item)
|
||||
// })
|
||||
// // let name = this.filterNameFunc(val,this.treeList);
|
||||
// // if(name){
|
||||
// // return name;
|
||||
// // } else {
|
||||
// // return "";
|
||||
// // }
|
||||
// return this.groupName;
|
||||
// },
|
||||
// filterNameFunc(val,obj){
|
||||
// console.log(val,obj,666777888)
|
||||
// if (obj.children && obj.children.length > 0) {
|
||||
// this.groupName = this.groupName + '-' + obj.deptName
|
||||
// obj.children.map((item) => {
|
||||
// this.filterNameFunc(val,obj.children);
|
||||
// });
|
||||
// } else {
|
||||
// if(obj.id == val){
|
||||
// this.groupName = this.groupName + obj.deptName
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
getTreeList() {
|
||||
getTreeGroupApi({
|
||||
projectSn: this.$store.state.projectSn,
|
||||
@ -554,10 +599,14 @@ export default {
|
||||
// 树形控件点击
|
||||
treeClick(data) {
|
||||
console.log(data);
|
||||
this.selectVal = data.deptName;
|
||||
this.selectTreeData = data;
|
||||
this.addEditForm.xzProjectOrgId = data.id;
|
||||
// this.$refs.addEditForm.validateField("xzProjectOrgId")
|
||||
if(data.status == 1){
|
||||
this.$message.warning("无法选中已禁用组织");
|
||||
} else {
|
||||
this.selectVal = data.deptName;
|
||||
this.selectTreeData = data;
|
||||
this.addEditForm.xzProjectOrgId = data.id;
|
||||
// this.$refs.addEditForm.validateField("xzProjectOrgId")
|
||||
}
|
||||
},
|
||||
configFn(item) {
|
||||
this.companyDialog = true;
|
||||
|
||||
@ -641,7 +641,7 @@ export default {
|
||||
buildStartTime: this.addForm.buildTime[0],
|
||||
buildEndTime: this.addForm.buildTime[1],
|
||||
planStartTime: this.addForm.planTime[0] ? this.addForm.planTime[0]:'',
|
||||
planEndTime: this.addForm.planTime[1] ? this.addForm.planTime[0]:'',
|
||||
planEndTime: this.addForm.planTime[1] ? this.addForm.planTime[1]:'',
|
||||
// typeDescribeId: this.addForm.typeDescribeId.join(','),
|
||||
responsibilityCompany: this.addForm.responsibilityCompany.join(','),
|
||||
securityConstructionSchemeType: this.addForm.securityConstructionSchemeType ? 2:1,
|
||||
|
||||
@ -339,9 +339,16 @@
|
||||
<template slot-scope="scope">
|
||||
<!-- {{JSON.parse(dialogdata.optionResult)}} -->
|
||||
<span
|
||||
v-for="item in JSON.parse(dialogdata.optionResult)"
|
||||
v-for="(item,index) in JSON.parse(dialogdata.optionResult)"
|
||||
:key="item.value"
|
||||
>{{ item.name }}、</span
|
||||
>
|
||||
<span v-if="index < JSON.parse(dialogdata.optionResult).length -1">
|
||||
{{ item.name }}、
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -415,6 +422,7 @@
|
||||
<el-select
|
||||
v-model="addCheckTable.optionResult"
|
||||
placeholder="请选择"
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
v-for="item in resultList"
|
||||
@ -684,7 +692,9 @@ export default {
|
||||
checkContent: [{ required: true, message: "必填", trigger: "blur" }],
|
||||
checkDetailContent: [{ required: true, message: "必填", trigger: "blur" }],
|
||||
},
|
||||
addCheckTable: {},
|
||||
addCheckTable: {
|
||||
optionResult: []
|
||||
},
|
||||
addTable: false,
|
||||
resultList: [
|
||||
{
|
||||
@ -734,14 +744,16 @@ export default {
|
||||
// 新增检查表
|
||||
addChecklist() {
|
||||
this.addTable = true;
|
||||
this.addCheckTable = {}
|
||||
this.addCheckTable = {
|
||||
optionResult: []
|
||||
}
|
||||
},
|
||||
// 确定按钮
|
||||
addCheckTableSave() {
|
||||
let data = this.addCheckTable
|
||||
let data = {...this.addCheckTable}
|
||||
data.creatorUser = this.$store.state.userInfo.userId
|
||||
data.classifyId = this.leftId
|
||||
|
||||
data.optionResult = this.addCheckTable.optionResult.join(',')
|
||||
this.$refs['addCheckTable'].validate(valid => {
|
||||
if (valid) {
|
||||
addinspectTableApi(data).then((res) => {
|
||||
|
||||
@ -510,9 +510,10 @@
|
||||
ref="multipleTable"
|
||||
:data="itemDetailsData"
|
||||
style="width: 100%"
|
||||
@select="handleSelectionChange">
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="55" v-if="$route.path.indexOf('/project/') == -1">
|
||||
</el-table-column>
|
||||
<!-- 分类 -->
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
style="margin-right: 800px;margin-top:80px"
|
||||
style="margin-right: 800px;"
|
||||
class="pagerBox"
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@ -872,12 +872,15 @@ export default {
|
||||
padding: 0 10px;
|
||||
padding-top: 20px;
|
||||
box-sizing: border-box;
|
||||
.search-box {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
.search-input {
|
||||
width: 260px;
|
||||
margin-right: 20px;
|
||||
>div{
|
||||
height: 100%;
|
||||
.search-box {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
.search-input {
|
||||
width: 260px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -885,6 +888,14 @@ export default {
|
||||
.el-icon-delete {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.table-box{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100% - 72px);
|
||||
.tables{
|
||||
margin-bottom: auto;
|
||||
}
|
||||
}
|
||||
.table-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@ -21,52 +21,54 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table_wrap whiteBlock">
|
||||
<el-table class="tables" :data="tableData">
|
||||
<el-table-column prop="deviceName" align="center" label="机械设备名称" width="280"></el-table-column>
|
||||
<el-table-column prop="deviceNumber" align="center" label="设备序号"></el-table-column>
|
||||
<el-table-column prop="deviceDriver" align="center" label="司机"></el-table-column>
|
||||
<el-table-column prop="timeOfAdd" align="center" label="新增时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="280">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div @click="edit(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||
<span style="white-space: nowrap;">编辑</span>
|
||||
<vue-scroll style="height: 80%">
|
||||
<el-table class="tables" :data="tableData">
|
||||
<el-table-column prop="equipmentName" align="center" label="机械设备名称" width="280"></el-table-column>
|
||||
<el-table-column prop="devSn" align="center" label="设备序号"></el-table-column>
|
||||
<el-table-column prop="driverName" align="center" label="司机"></el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="新增时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="280">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div @click="edit(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||
<span style="white-space: nowrap;">编辑</span>
|
||||
</div>
|
||||
<div @click="deleteDev(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||
<span style="white-space: nowrap;">删除</span>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="deleteDev(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||
<span style="white-space: nowrap;">删除</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 >
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</vue-scroll>
|
||||
<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="deviceName">
|
||||
<el-input v-model="addEditForm.deviceName" placeholder="请输入"></el-input>
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<el-input v-model="addEditForm.equipmentName" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="司机" prop="deviceDriver">
|
||||
<el-input v-model="addEditForm.deviceDriver" placeholder="请输入"></el-input>
|
||||
<el-form-item label="设备序号" prop="devSn">
|
||||
<el-input v-model="addEditForm.devSn" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新增时间" prop="timeOfAdd">
|
||||
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="addEditForm.timeOfAdd"
|
||||
type="datetime" placeholder="请选择时间" >
|
||||
<el-form-item label="司机" prop="driverId">
|
||||
<el-select v-model="addEditForm.driverId" placeholder="请选择" clearable :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in workerList" :key="index" :label="item.workerName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="新增时间" prop="createTime">
|
||||
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="addEditForm.createTime" type="datetime" placeholder="请选择时间">
|
||||
</el-date-picker>
|
||||
</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 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 type="primary" icon="el-icon-circle-check" @click="submit" size="medium">{{ $t('message.deviceManage.save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
@ -75,12 +77,18 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { rtToolPageHistory, rtToolAdd, rtToolDelete, rtToolEdit, rtToolPage } from '@/assets/js/api/workTicketManage.js'
|
||||
import { } from '@/assets/js/api/devicePosition/deviceCentral.js'
|
||||
import {
|
||||
getDeviceCentraliceCentralPageApi,
|
||||
addDeviceCentraliceCentralPageApi,
|
||||
editDeviceCentraliceCentralPageApi,
|
||||
deleteDeviceCentraliceCentralPageApi,
|
||||
getWorkerInfoListApi,
|
||||
} from '@/assets/js/api/devicePosition/equipmentPosition.js'
|
||||
export default {
|
||||
mounted() {},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getPage()
|
||||
this.getWorkerInfoList()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -89,47 +97,38 @@ export default {
|
||||
pagInfo: {
|
||||
pageNo: 1, //页数
|
||||
pageSize: 10, //条数
|
||||
total: 0 //总条数
|
||||
total: 0, //总条数
|
||||
},
|
||||
tableData: [
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
{deviceName: '压路机', deviceNumber: 'EMP21354656321321', deviceDriver: '李大鹏',timeOfAdd: '2024-03-13 00:00:00'},
|
||||
],
|
||||
tableData: [],
|
||||
addEditForm: {
|
||||
deviceName: '',
|
||||
deviceDriver: '',
|
||||
timeOfAdd: '',
|
||||
equipmentName: '',
|
||||
devSn: '',
|
||||
createTime: '',
|
||||
driverId: '',
|
||||
},
|
||||
addEditRules: {
|
||||
deviceName: [{ required: true, message: '必填', trigger: 'blur' }],
|
||||
deviceDriver: [{ required: true, message: '必填', trigger: 'blur' }]
|
||||
equipmentName: [{ required: true, message: '必填', trigger: 'blur' }],
|
||||
devSn: [{ required: true, message: '必填', trigger: 'blur' }],
|
||||
driverId: [{ required: true, message: '必填', trigger: 'blur' }],
|
||||
},
|
||||
searchForm: {}
|
||||
searchForm: {},
|
||||
workerList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
// rtToolPage({
|
||||
// pageNo: this.pagInfo.pageNo,
|
||||
// pageSize: this.pagInfo.pageSize,
|
||||
// projectSn: this.$store.state.projectSn,
|
||||
// devSn: this.searchForm.devSn,
|
||||
// toolName: this.searchForm.toolName,
|
||||
// toolStatus: this.searchForm.toolStatus,
|
||||
// }).then(result => {
|
||||
// if (result.success) {
|
||||
// this.tableData = result.result.records
|
||||
// this.pagInfo.total = result.result.total
|
||||
// }
|
||||
// })
|
||||
getPage() {
|
||||
getDeviceCentraliceCentralPageApi({
|
||||
pageNo: this.pagInfo.pageNo,
|
||||
pageSize: this.pagInfo.pageSize,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
devSn: this.searchForm.devSn,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((result) => {
|
||||
if (result.success) {
|
||||
this.tableData = result.result.records
|
||||
this.pagInfo.total = result.result.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
add() {
|
||||
@ -146,20 +145,20 @@ export default {
|
||||
submit() {
|
||||
let params = JSON.parse(JSON.stringify(this.addEditForm))
|
||||
params.projectSn = this.$store.state.projectSn
|
||||
this.$refs.addEditForm.validate(valid => {
|
||||
this.$refs.addEditForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.title == '新增') {
|
||||
rtToolAdd(params).then(result => {
|
||||
addDeviceCentraliceCentralPageApi(params).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
this.getList()
|
||||
this.getPage()
|
||||
}
|
||||
})
|
||||
} else if (this.title == '编辑') {
|
||||
rtToolEdit(params).then(result => {
|
||||
editDeviceCentraliceCentralPageApi(params).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
this.getList()
|
||||
this.getPage()
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -173,20 +172,23 @@ export default {
|
||||
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
rtToolDelete({ id: obj.id }).then(res => {
|
||||
deleteDeviceCentraliceCentralPageApi({
|
||||
id: obj.id,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.getList()
|
||||
this.getPage()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
message: '删除成功!',
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.message
|
||||
message: res.message,
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -194,10 +196,24 @@ export default {
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
message: '已取消删除',
|
||||
})
|
||||
})
|
||||
},
|
||||
async getWorkerInfoList() {
|
||||
await getWorkerInfoListApi({
|
||||
pageNo: this.pagInfo.pageNo,
|
||||
// pageSize: this.pagInfo.pageSize,
|
||||
pageSize: 100000,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
// personType: 1,
|
||||
inserviceType: 1,
|
||||
}).then((result) => {
|
||||
if (result.success) {
|
||||
this.workerList = result.result.records
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.addEditForm = {}
|
||||
this.$nextTick(() => {
|
||||
@ -206,24 +222,25 @@ export default {
|
||||
},
|
||||
SizeChange(val) {
|
||||
this.pagInfo.pageSize = val
|
||||
this.getList()
|
||||
this.getPage()
|
||||
},
|
||||
CurrentChange(val) {
|
||||
this.pagInfo.pageNo = val
|
||||
this.getList()
|
||||
this.getPage()
|
||||
},
|
||||
refresh() {
|
||||
this.searchForm = {}
|
||||
this.pagInfo.pageNo = 1 //页数
|
||||
this.pagInfo.pageSize = 10 //条数
|
||||
this.getList()
|
||||
this.getPage()
|
||||
this.getWorkerInfoList()
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.tables{
|
||||
min-height: 0;
|
||||
.tables {
|
||||
// min-height: 0;
|
||||
}
|
||||
.tables2 {
|
||||
min-height: auto;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
id="myIframe"
|
||||
ref="myIframeRef"
|
||||
:src="
|
||||
`${$store.state.WORKFLOWURL}?token=${$store.state.userInfo.token}`
|
||||
`${$store.state.WORKFLOWURL}?token=${$store.state.userInfo.token}&projectSn=${$store.state.projectSn}`
|
||||
"
|
||||
style="width: 100%; height: 100%; border: medium none"
|
||||
frameborder="1"
|
||||
@ -30,18 +30,20 @@
|
||||
:show-close="false"
|
||||
:visible.sync="selectGroupDialog"
|
||||
>
|
||||
<div class="content-list">
|
||||
<div
|
||||
class="content-list-item"
|
||||
v-for="(item, index) in groupListData"
|
||||
:key="index"
|
||||
@click="selectedGroupData(item)"
|
||||
>
|
||||
<!-- <i class="el-icon-trophy-1"></i> -->
|
||||
<img src="@/assets/images/headerImg/icon3.png" />
|
||||
<span>{{ item.companyName }}</span>
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</div>
|
||||
<div class="content-list" :style="{height: groupListData.length > 4?'300px':'auto'}">
|
||||
<vue-scroll style="height: 100%;">
|
||||
<div
|
||||
class="content-list-item"
|
||||
v-for="(item, index) in groupListData"
|
||||
:key="index"
|
||||
@click="selectedGroupData(item)"
|
||||
>
|
||||
<!-- <i class="el-icon-trophy-1"></i> -->
|
||||
<img src="@/assets/images/headerImg/icon3.png" />
|
||||
<span>{{ item.companyName }}</span>
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</div>
|
||||
</vue-scroll>
|
||||
<!-- <div class="content-list-item" @click="selectedGroupData()">
|
||||
<img src="@/assets/images/headerImg/icon4.png" />
|
||||
<span>{{ $store.state.userInfo.account }}</span>
|
||||
@ -176,8 +178,10 @@ export default {
|
||||
});
|
||||
console.log(responseMenuList, "我的测试11112222222222");
|
||||
this.postMessageDataList = responseMenuList;
|
||||
let iframe = this.$refs.myIframeRef;
|
||||
iframe.addEventListener("load", this.onIframeLoad);
|
||||
this.$nextTick(() => {
|
||||
let iframe = this.$refs.myIframeRef;
|
||||
iframe.addEventListener("load", this.onIframeLoad);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 默认选中已选中组织的第一个项目
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user