Merge branch 'bjxz-dev' of http://139.9.66.234:18023/dhp/zhgdyun into bjxz-dev

This commit is contained in:
Rain 2024-10-21 10:36:51 +08:00
commit b3597a9440
11 changed files with 343 additions and 37 deletions

View File

@ -1,5 +1,5 @@
//-------项目配置标识-------
var COMPANY = ""; //通用
// var COMPANY = ""; //通用
// var COMPANY='zhongjian'; //中建,和沃尔对接的插件版用这个企业
// var COMPANY='hezhan'; //合展-宿迁
// var COMPANY='nanchang'; //南昌地铁、衢州
@ -21,7 +21,7 @@ var COMPANY = ""; //通用
// COMPANY = "agjt"; //鞍钢集团
// COMPANY = 'zkax' //中科安信
// COMPANY = 'hfqc' //乌丹站舍(合肥启程)
// COMPANY = 'mulei' //木垒
COMPANY = 'mulei' //木垒
var PROJECT = {
local_test: "common", // 普通版

View File

@ -218,4 +218,10 @@ export const getSelectQualityStatisticsNumApi = data => post('/xmgl/qualityInspe
export const getStatsByEnterpriseApi= data => post('/xmgl/qualityInspectionRecord/statsByEnterprise', data); // 分包单位统计
export const getRiskChartApi = data => post('/xmgl/qualityInspectionRecord/riskChart', data); // 风险走势图
export const getCountDangerLevelApi = data => post('/xmgl/qualityInspectionRecord/countDangerLevel', data); // 隐患数量展示
export const getcountQualityInspectionRecordRegionApi = data => post('/xmgl/qualityInspectionRecord/countQualityInspectionRecordRegion', data); // 责任区域数据统计
export const getcountQualityInspectionRecordRegionApi = data => post('/xmgl/qualityInspectionRecord/countQualityInspectionRecordRegion', data); // 责任区域数据统计
// 质量文件管理
export const getQualityFileListApi = data => post('/xmgl/qualityFile/page', data);
export const addQualityFileApi = data => post('/xmgl/qualityFile/add', data);
export const updateQualityFileApi = data => post('/xmgl/qualityFile/edit', data);
export const deleteQualityFileApi = data => post('/xmgl/qualityFile/delete', data);

View File

@ -180,12 +180,12 @@ if (process.env.NODE_ENV == "development") {
// axios.defaults.baseURL = 'http://192.168.34.221:28890/' //郭圣雄本地
// axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
// axios.defaults.baseURL = "http://192.168.34.221:19112/"; //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
// axios.defaults.baseURL = 'http://182.90.224.237:51234/' //郭圣雄远程
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
// 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/'//中建四局线上(最新)地址
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址

View File

@ -394,15 +394,15 @@ function getPubKey(callback) {
// }
// }
// 监听滚动条
window.addEventListener('scroll', () => {
// console.log('滚动条')
if(oWebControl != null){
width = document.getElementById('videoOverview').offsetWidth-20
height = document.getElementById('videoOverview').offsetHeight-18
oWebControl.JS_Resize(width, height );
}
},true);
// 监听滚动条 - 滚动摄像头列表会照成抖动(去除
// window.addEventListener('scroll', () => {
// // console.log('滚动条')
// if(oWebControl != null){
// width = document.getElementById('videoOverview').offsetWidth-20
// height = document.getElementById('videoOverview').offsetHeight-18
// oWebControl.JS_Resize(width, height );
// }
// },true);
// 监听窗口
// window.addEventListener('resize', () => {
// console.log('窗口')

View File

@ -380,15 +380,15 @@ function getPubKey(callback) {
// }
// }
// 监听滚动条
window.addEventListener('scroll', () => {
// console.log('滚动条')
if(oWebControl != null){
width = document.getElementById('videoOverview').offsetWidth-20
height = document.getElementById('videoOverview').offsetHeight-18
oWebControl.JS_Resize(width, height );
}
},true);
// 监听滚动条 - 滚动摄像头列表会照成抖动(去除
// window.addEventListener('scroll', () => {
// // console.log('滚动条')
// if(oWebControl != null){
// width = document.getElementById('videoOverview').offsetWidth-20
// height = document.getElementById('videoOverview').offsetHeight-18
// oWebControl.JS_Resize(width, height );
// }
// },true);
// 监听窗口
// window.addEventListener('resize', () => {
// console.log('窗口')

View File

@ -116,13 +116,13 @@ export default {
}
});
// scroll使
$(window).scroll(() => {
if (this.oWebControl != null) {
this.oWebControl.JS_Resize(this.width, this.height);
this.setWndCover();
}
})
// scroll使 - (
// $(window).scroll(() => {
// if (this.oWebControl != null) {
// this.oWebControl.JS_Resize(this.width, this.height);
// this.setWndCover();
// }
// })
},
beforeDestroy() {
this.closeWindow();//

View File

@ -1538,6 +1538,14 @@ const routes2 = [{
"@/views/projectFront/quality/subdivisionalWorks.vue",
], resolve),
},
{
path: "/project/quality/qualityFile", //质量管理 -- 分布分项工程
name: "质量管理_质量文件管理",
component: (resolve) =>
require([
"@/views/projectFront/quality/qualityFile.vue",
], resolve),
},
{
path: "/project/quality/rectificationRanking", //质量管理 -- 整改排名
name: "质量管理_整改排名1",

View File

@ -56,13 +56,13 @@ export default new Vuex.Store({
// FILEURL: 'http://1.13.185.209:9820/image/', // 中科佳成
// UPLOADURL: 'http://8.136.222.164:8808/upload/image/', // 中科安信
// FILEURL: 'http://8.136.222.164:8808/image/', // 中科安信
UPLOADURL: 'http://101.43.164.214:11111/upload/image/', // 百色
FILEURL: 'http://101.43.164.214:11111/image/', // 百色
// UPLOADURL: 'http://101.43.164.214:11111/upload/image/', // 百色
// FILEURL: 'http://101.43.164.214:11111/image/', // 百色
WORKFLOWURL: "http://101.43.164.214:11129/#/workspace/forms", // 百色
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',
// FILEURL:'http://182.90.224.237:51234/image/',
// UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地
// FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地
UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地
FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地
// UPLOADURL: 'http://192.168.34.221:9111/upload/image/', // 郭圣雄本地
// FILEURL: 'http://192.168.34.221:9111/image/', //郭圣雄本地
// WORKFLOWURL: "http://192.168.34.216:88/#/workspace/forms", //jiayu工作流地址(本地)
@ -72,8 +72,8 @@ export default new Vuex.Store({
CONTRACTORURL2: process.env.NODE_ENV == "development" ? "http://192.168.34.175:88/#/workspace/contractorApply" : `${window.location.protocol}//${window.location.host}/contractorApply/index.html#/workspace/contractorApply`, //罗峰承包商入场地址(本地)
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程
// FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程
UPLOADURL: 'http://42.180.188.17:11211/upload/image', //测试
FILEURL: 'http://42.180.188.17:11211/image/', //测试
// UPLOADURL: 'http://42.180.188.17:11211/upload/image', //测试
// FILEURL: 'http://42.180.188.17:11211/image/', //测试
// BASEURL: baseUrl ?
// baseUrl : window.location.protocol + "//" + window.location.host + "/", //正式环境
// UPLOADURL: window.location.protocol + "//" + window.location.host + "/upload/image", //正式环境

View File

@ -1,6 +1,31 @@
import resetForm from './resetForm';
import nowDate from './nowDate';
// 下载
export function download(url, fileName) {
const x = new XMLHttpRequest()
x.open('GET', url, true)
x.responseType = 'blob'
x.onload = () => {
const url = window.URL.createObjectURL(x.response)
createAndRemove(url, fileName)
}
x.send()
}
function createAndRemove(url, fileName) {
// 创建隐藏的可下载链接
var eleLink = document.createElement('a')
eleLink.download = fileName
eleLink.style.display = 'none'
// 下载内容转变成blob地址
eleLink.href = url
// 触发点击
document.body.appendChild(eleLink)
eleLink.click()
// 然后移除
document.body.removeChild(eleLink)
}
export {
resetForm, nowDate
}

View File

@ -595,7 +595,7 @@ export default {
getUserByUidApi(data).then((res) => {
if (res.code == 200) {
//
this.parseLoginData(res.result);
this.parseLoginData(res.result, true);
} else {
this.$message.error(res.message);
}

View File

@ -0,0 +1,267 @@
<template>
<div class="fullHeight">
<div class="searchBox whiteBlock">
<el-button type="warning" size="medium" plain @click="refresh">{{ $t('message.deviceManage.refresh') }}</el-button>
<el-button type="primary" size="medium" @click="add">{{ $t('message.deviceManage.add') }}</el-button>
</div>
<div class="table_wrap whiteBlock">
<el-table class="tables" :data="dataList" height="800">
<el-table-column prop="name" align="center" label="文件名称"></el-table-column>
<el-table-column prop="typeName" align="center" label="文件类型"></el-table-column>
<el-table-column prop="fileUrl" label="文件" align="center">
<template slot-scope="scope">
<el-link type="primary" @click="handleDownload(scope.row)">
{{ scope.row.fileUrl }}
</el-link>
</template>
</el-table-column>
<el-table-column :label="$t('message.deviceManage.operation')" align="center">
<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>{{ $t('message.deviceManage.edit') }}</span>
</div>
<div @click="deleteDev(scope.row)" class="operationText">
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
<span>{{ $t('message.deviceManage.delete') }}</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
layout="total, prev, pager, next, jumper"
/>
</div>
<el-dialog
:modal-append-to-body="false"
@close="close"
:title="Popup.type === 'add' ? '新增文件' : '编辑文件'"
:visible.sync="Popup.show"
width="667px"
>
<div class="dialog_content">
<el-form
v-if="Popup.type === 'add' || Popup.type === 'edit'"
size="medium"
ref="addEditForm"
:model="addEditForm"
:rules="addEditRules"
label-width="140px"
class="dialogFormBox"
>
<el-form-item label="文件名称" prop="name">
<el-input v-model="addEditForm.name" :placeholder="$t('message.deviceManage.placeholder')"></el-input>
</el-form-item>
<el-form-item label="文件类型" prop="type">
<el-select v-model="addEditForm.type" placeholder="请选择">
<el-option v-for="item in dictionaryList" :key="item.data" :label="item.name" :value="item.data"></el-option>
</el-select>
</el-form-item>
<el-form-item label="文件" prop="fileUrl">
<el-upload
class="upload-demo"
name="files"
:action="$store.state.UPLOADURL"
:on-remove="handleRemove"
:multiple="false"
:on-exceed="handleExceed"
:on-success="handleSuccess"
:file-list="fileList"
:limit="1"
>
<el-button size="medium" type="primary">
{{ $t('message.docManage.dialog_upload_files.click_upload') }}
</el-button>
<!-- <div slot="tip" class="el-upload__tip">
{{ $t('message.docManage.dialog_upload_files.upload_msg') }}
</div> -->
</el-upload>
</el-form-item>
<div class="dialog-footer">
<el-button class="cancleBtn" @click="close" 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>
</template>
<script>
import { getQualityFileListApi, addQualityFileApi, updateQualityFileApi, deleteQualityFileApi } from '@/assets/js/api/quality'
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
import { download } from '@/util'
export default {
mounted() {
this.getDictionaryList()
this.getList()
},
computed: {
headers() {
return { Authorization: this.$store.state.userInfo.token }
}
},
data() {
return {
props: {
multiple: true
},
total: 0,
//
queryParams: {
pageNo: 1,
pageSize: 10,
},
dictionaryList: [],
fileList: [], //
addEditRules: {
type: [{ required: true, message: '请选择文件类型', trigger: 'change' }],
fileUrl: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
addEditForm: {},
dataList: [],
Popup: {
type: 'add',
show: false
}
}
},
methods: {
//
getDictionaryList() {
getDictionaryItemApi({
dictionaryEncoding: 'quality_file_type'
}).then(res => {
if (res.result.length > 0) {
this.dictionaryList = res.result
}
})
},
handle(type, show) {
//
this.Popup = {
type: type,
show: show
}
},
add() {
this.handle('add', true)
},
edit(obj) {
this.addEditForm = JSON.parse(JSON.stringify(obj))
this.fileList = [
{
name: obj.name,
url: obj.fileUrl
}
]
// this.$forceUpdate();
console.log('#编辑', obj)
this.handle('edit', true)
},
deleteDev(obj) {
console.log('删除', obj)
this.$confirm(this.$t('message.projectInfo.confirmTipText') + '?', this.$t('message.projectInfo.tip'), {
confirmButtonText: /* '确定', */ this.$t('message.energyManage.material.confirm'),
cancelButtonText: /* '取消', */ this.$t('message.energyManage.material.cancel'),
type: 'warning'
})
.then(() => {
deleteQualityFileApi({ id: obj.id }).then(result => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
})
.catch(() => {})
},
submit() {
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate(valid => {
if (valid) {
const api = this.Popup.type === 'add' ? addQualityFileApi : updateQualityFileApi
api(params).then(result => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
this.Popup.show = false
} else {
return false
}
})
},
//
handleSuccess(res) {
console.log('导入', res)
this.addEditForm.fileUrl = res.data[0].imageUrl
this.addEditForm.name = res.data[0].fileInfo.originalFilename
},
handleRemove(file, fileList) {
this.fileList = fileList
this.addEditForm.fileUrl = ''
},
handleExceed() {},
handleDownload(data) {
download(this.$store.state.FILEURL + data.fileUrl, data.name)
},
refresh() {
this.getList()
},
getList() {
getQualityFileListApi({
...this.queryParams,
projectSn: this.$store.state.projectSn
}).then(res => {
if (res.success) {
console.log('records', res.result)
this.dataList = res.result.records
this.total = res.result.total
console.log('run', this.dataList)
}
})
},
close() {
this.Popup.show = false
this.addEditForm = {}
this.fileList = []
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate()
})
}
}
}
</script>
<style lang="less" scoped>
.tables {
img {
cursor: pointer;
}
}
.tableBtns {
display: flex;
justify-content: center;
}
.yj-dialogFormBox {
width: 462px;
}
::v-deep .el-input__inner {
line-height: 1px !important;
}
</style>