fix: BUG修改

This commit is contained in:
kun 2023-07-10 11:00:11 +08:00
parent 94d9dfaef0
commit c8ac1c7b1c
9 changed files with 356 additions and 69 deletions

View File

@ -144,7 +144,7 @@ onMounted(async () => {
});
const goDataManagement = val => {
if (val == 0) {
router.push("/goverment/huizhou/progressManagement/projectSchedule/index");
router.push("/goverment/huizhou/projectMonitoring/progressManagement/index");
} else if (val == 1) {
router.push("/goverment/huizhou/projectMonitoring/qualityControl/index");
} else if (val == 2) {

View File

@ -132,13 +132,13 @@ import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@
const refChart = ref();
const headerList = reactive([
{ label: "未开始", color: "#35e5fd" },
{ label: "进行中", color: "#4fd389" },
{ label: "已完成", color: "#f1d520" },
{ label: "进行中", color: "#f1d520" },
{ label: "已完成", color: "#4fd389" },
{ label: "已逾期", color: "#fc6f8e" }
]);
const colors = ref(["#35e5fd", "#f1d520", "#4fd389", "#fc6f8e"]);
const active = ref(0);
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
const colors = ref(["#35e5fd", "#f1d520", "#4fd389", "#fc6f8e"]);
const projects = ref([]);
const pages = ref({
pageNo: 1,
@ -417,7 +417,7 @@ const setGantts = () => {
projects.map(project => {
let { planEndTime, name, gantts } = project;
const gantt = getGanttStyle(project);
gantt.background = colors.value[project.state];
gantt.background = colors.value[project.state - 1];
if (gantts) {
gantts.push(gantt);

View File

@ -12,6 +12,7 @@
</template>
<div class="detail-table">
<div class="button-title">
<span>申报时段</span>
<el-select v-model="searchParams.applyId" placeholder="请选择" style="margin-right: 10px">
<el-option v-for="item in applyTimeArr" :label="item.name" :value="item.id" />
</el-select>
@ -40,8 +41,8 @@
<el-table-column prop="completeAmount" label="本期完成工程造价(元)" width="200"> </el-table-column>
<el-table-column prop="lastEndAmount" label="至上期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="nowEndAmount" label="至本期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column>
<!-- <el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column> -->
<el-table-column align="left" label="操作">
<template #default="scope">
<el-button type="primary" v-if="scope.row.id" link @click="handleEditItem(scope.row)">
@ -153,8 +154,10 @@ const getApplyTimeList = async () => {
applyTimeArr.value = res.result;
if (res && res.result.length > 0) {
searchParams.value.applyId = res.result[0].id;
getSubItemList();
} else {
recordData.value = [];
}
getSubItemList();
console.log(res, "----------申报时段");
};
const getSubItemList = async () => {
@ -162,12 +165,24 @@ const getSubItemList = async () => {
const res2 = await payGovermentSubItemCount({ investmentApplyId: searchParams.value.applyId });
console.log(res, "-----子项数据");
console.log(res2, "-----子项统计数据");
if (!res.result) {
symbolArr.value = JSON.parse(JSON.stringify(res.result));
if (res2.result) {
countData.value = JSON.parse(JSON.stringify(res2.result));
} else {
countData.value = reactive({
constructionCost: 0,
payment: 0,
advanceCharge: 0,
unPayment: 0,
applyPayment: 0,
scheduleRatio: 0,
completeScheduleRatio: 0
});
}
if (!res.result || res.result.length == 0) {
recordData.value = [];
return;
}
symbolArr.value = JSON.parse(JSON.stringify(res.result));
countData.value = JSON.parse(JSON.stringify(res2.result));
let sumRowData = {
//
reportContent: "合计:",
@ -246,7 +261,7 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
console.log(symbolArr.value.length);
if (rowIndex > symbolArr.value.length) {
if (columnIndex === 1) {
return [1, 7];
return [1, 5];
} else if (columnIndex > 2) {
return [0, 0];
}
@ -344,6 +359,10 @@ onMounted(() => {});
.button-title {
@include flex;
> span {
font-size: 16px;
color: var(--el-menu-text-color);
}
}
.table {

View File

@ -35,8 +35,8 @@
<el-table-column prop="completeAmount" label="本期完成工程造价(元)" width="200"> </el-table-column>
<el-table-column prop="lastEndAmount" label="至上期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="nowEndAmount" label="至本期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column>
<!-- <el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column> -->
<el-table-column align="left" label="操作">
<template #default="scope">
<el-button type="primary" v-if="scope.row.id" link @click="handleEditItem(scope.row)">
@ -168,17 +168,17 @@ const formConfig = {
label: "至本期末完成工程造价(元)",
prop: "nowEndAmount",
type: "input"
},
{
label: "本期完成形象进度(%)",
prop: "scheduleRatio",
type: "input"
},
{
label: "至本期末完成形象进度(%)",
prop: "completeScheduleRatio",
type: "input"
}
// {
// label: "(%)",
// prop: "scheduleRatio",
// type: "input"
// },
// {
// label: "(%)",
// prop: "completeScheduleRatio",
// type: "input"
// }
],
rules: {
reportContent: [
@ -501,12 +501,24 @@ const getSubItemList = async () => {
const res2 = await payGovermentSubItemCount({ investmentApplyId: props.relativeId });
console.log(res, "-----子项数据");
console.log(res2, "-----子项统计数据");
if (!res.result || !res2.result) {
symbolArr.value = JSON.parse(JSON.stringify(res.result));
if (res2.result) {
countData.value = JSON.parse(JSON.stringify(res2.result));
} else {
countData.value = reactive({
constructionCost: 0,
payment: 0,
advanceCharge: 0,
unPayment: 0,
applyPayment: 0,
scheduleRatio: 0,
completeScheduleRatio: 0
});
}
if (!res.result || res.result.length == 0) {
recordData.value = [];
return;
}
symbolArr.value = JSON.parse(JSON.stringify(res.result));
countData.value = JSON.parse(JSON.stringify(res2.result));
let sumRowData = {
//
reportContent: "合计:",
@ -585,7 +597,7 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
console.log(symbolArr.value.length);
if (rowIndex > symbolArr.value.length) {
if (columnIndex === 1) {
return [1, 7];
return [1, 5];
} else if (columnIndex > 2) {
return [0, 0];
}

View File

@ -66,9 +66,10 @@
<div class="blockTitle">
<img src="@/assets/images/hzImg/xm/gdxcsp.png" alt="" class="title" />
</div>
<div class="blockContent" style="height: 236px">
<div class="blockContent">
<!-- <img src="@/assets/images/hzImg/xm/video.png" alt="" width="100%" height="100%" /> -->
<video style="width: 100%; height: 100%; object-fit: fill" controls :src="videoData.videoUrl"></video>
<!-- <div id="playWnd" class="playWnd" style="width: 300px;height: 300px;"></div> -->
</div>
</div>
</div>
@ -153,7 +154,7 @@
</template>
<script setup lang="tsx" name="largeScreen">
import { ref, reactive, onMounted } from "vue";
import { ref, reactive, onMounted, getCurrentInstance, nextTick, onBeforeUnmount, Ref, watch } from "vue";
import projectInfo from "./components/projectInfo.vue";
import pieChart from "./components/pieChart.vue";
import milestone from "./components/milestone.vue";
@ -162,6 +163,7 @@ import environment from "./components/environment.vue";
import projectInfoDialog from "./components/projectInfoDialog.vue";
import { getInspectInfo } from "@/api/modules/projectLargeSreen";
import { screenPayment } from "@/api/modules/huizhou";
import { getpreviewURL, getConfigInfo } from "@/api/modules/common";
//
const projectData = ref({
@ -169,6 +171,19 @@ const projectData = ref({
longitude: "",
totalDay: ""
});
const playWndBox = ref(null);
let playWndHeight = ref("");
let playWndWidth = ref("");
let oWebControl = ref(null);
let pubKey = ref("");
let objData = ref({
appkey: "", //appkey
ip: "", //ip
secret: "", //secret
port: 18443,
playMode: 0, // 0 1
layout: "4x6" //16
});
const getProjectData = (data: any) => {
projectData.value = data;
};
@ -176,6 +191,20 @@ const videoData = ref({
videoUrl: ""
});
const dataObj = ref({});
//
const getVideoConfig = async () => {
// await sendRequest({ code: cameraIndexCode.value });
const res = await getConfigInfo({});
objData.value = reactive({
appkey: res.result.appKey, //appkey
ip: res.result.ip + ":" + res.result.port, //ip
secret: res.result.appSecret, //secret
port: 18443,
playMode: 0, // 0 1
layout: "4x6" //16
});
console.log(objData.value);
};
const getPayMentData = async () => {
const res = await screenPayment({});
console.log(res);
@ -252,11 +281,201 @@ const getInspect = async () => {
qualityData.value[1].value = res.result.qualityUnCompleted;
};
// --- end
onBeforeUnmount(() => {
if (oWebControl.value === undefined) {
//
oWebControl.JS_HideWnd();
//
oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
//
oWebControl.JS_Disconnect();
}
});
onMounted(async () => {
//
getVideoConfig();
await getInspect();
await getPayMentData();
// ee
const pageInstance = getCurrentInstance();
// dom
const tagDomObj = pageInstance?.refs.playWndBox;
playWndHeight.value = tagDomObj?.clientHeight;
playWndWidth.value = tagDomObj?.clientWidth;
// scroll使DIV
window.addEventListener("scroll", () => {
console.log(5);
// return
if (oWebControl.value == undefined) {
oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight);
// setWndCover();
}
});
// resize使DIV
window.addEventListener("resize", e => {
// console.log(0);
// lo
if (oWebControl.value == undefined) {
// console.log("wwwww", e);
oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight);
// oWebControl.JS_Resize(playWndHeight.value, playWndWidth.value);
// setWndCover();
}
});
//
nextTick(() => {
initPlugin();
});
});
const initPlugin = () => {
oWebControl = new WebControl({
szPluginContainer: "playWnd", // id
iServicePortStart: 15900, // 使
iServicePortEnd: 15900,
szClassId: "23BF3B0A-2C56-4D97-9C03-0CB103AA8F11", // IE10使ActiveXclsid
cbConnectSuccess: () => {
// WebControl
oWebControl
.JS_StartService("window", {
// WebControl
// "./VideoPluginConnect.dll"
dllPath: "./VideoPluginConnect.dll"
})
.then(
function () {
//
oWebControl.JS_SetWindowControlCallback({
// cbIntegrationCallBack: cbIntegrationCallBack,
});
//JS_CreateWnd
oWebControl
.JS_CreateWnd("playWnd", 1000, 600, { bEmbed: true }) //bEmbed: true
.then(function () {
//
init();
});
},
function () {
//
}
);
},
// WebControl
cbConnectError: function () {
// WebControl,
// console.log(0);
// oWebControl.value = null;
// // errorwakeup
// window.WebControl.JS_WakeUp("VideoWebPlugin://");
// initCount++;
// if (initCount < 3) {
// setTimeout(function () {
// initPlugin();
// }, 3000);
// } else {
// setTimeout(function () {
// setTimeout(function () {
// $router.push('/home/PlugDown')
// }, 4000)
// }, 4000)
// }
// if (initCount.value < 2) {
// oWebControl.value = null;
// ElMessage.warning("...");
// // errorwakeup
// window.WebControl.JS_WakeUp("VideoWebPlugin://");
// setTimeout(() => {
// initPlugin();
// }, 3000);
// initCount.value++;
// } else {
// window.location.href = this.videoWebPluginUrl;
// }
},
cbConnectClose: () => {
// bNormalClose = false
// JS_DisconnectbNormalClose = true
// console.log("cbConnectClose");
oWebControl.value = null;
}
});
// oWebControl.JS_CuttingPartWindow(500, 500, 500, 500);
};
//
const init = (callback: (() => void) | undefined) => {
getPubKey(() => {
let appkey = objData.value.appkey; //appkey
let secret = setEncrypt(objData.value.secret); //secret
let ip = objData.value.ip; //IP
let playMode = objData.value.playMode; //0-1-
let port = objData.value.port; //HTTPS443
let snapDir = "D:\\SnapDir"; //
let videoDir = "D:\\VideoDir"; //
let layout = objData.value.layout; //playMode
let enableHTTPS = 1; //HTTPS1
let encryptedFields = "secret"; //secret
let showToolbar = 1; //0-0-
let showSmart = 0; //线0-0-
let buttonIDs = "0,16,256,257,258,259,260,512,513,514,515,516,517,768,769"; //
// var toolBarButtonIDs = "2049,2304" //
oWebControl
.JS_RequestInterface({
funcName: "init",
argument: JSON.stringify({
appkey: appkey, //APIappkey
secret: secret, //APIsecret
ip: ip, //APIIP
playMode: playMode, //
port: port, //
snapDir: snapDir, //
videoDir: videoDir, //
layout: layout, //
enableHTTPS: enableHTTPS, //HTTPS
encryptedFields: encryptedFields, //
showToolbar: showToolbar, //
showSmart: showSmart, //
buttonIDs //
})
})
.then(function (oData: any) {
oWebControl.JS_Resize(playWndWidth.value, playWndHeight.value); // resizefirefoxDIV
if (callback) {
callback();
}
//
// oWebControl.JS_HideWnd()
});
});
};
// RSA
let setEncrypt = (value: string) => {
let encrypt = new window.JSEncrypt();
encrypt.setPublicKey(pubKey);
return encrypt.encrypt(value);
};
//
const getPubKey = (callback: { (): void; (): void }) => {
oWebControl
.JS_RequestInterface({
funcName: "getRSAPubKey",
argument: JSON.stringify({
keyLength: 1024
})
})
.then(function (oData: { responseMsg: { data: Ref<string> } }) {
if (oData.responseMsg.data) {
pubKey = oData.responseMsg.data;
callback();
}
});
};
</script>
<style scoped lang="scss">
@import url("./style.scss");

View File

@ -39,6 +39,18 @@
border: 1px solid rgb(39 88 192 / 60%);
border-radius: 0;
box-shadow: inset 0 0 2px 2px #051220;
.main {
width: 300px;
height: 300px;
.playWnd {
width: 300px;
height: 300px;
}
}
}
.middle-video {
width: 300px;
height: 300px;
}
.chartContent {
display: flex;

View File

@ -97,8 +97,8 @@ import { bigItemAll } from "@/api/modules/huizhou";
const refChart = ref();
const headerList = reactive([
{ label: "未开始", color: "#35e5fd" },
{ label: "进行中", color: "#4fd389" },
{ label: "已完成", color: "#f1d520" },
{ label: "进行中", color: "#f1d520" },
{ label: "已完成", color: "#4fd389" },
{ label: "已逾期", color: "#fc6f8e" }
]);
const colors = ref(["#35e5fd", "#f1d520", "#4fd389", "#fc6f8e"]);
@ -291,7 +291,7 @@ const setGantts = () => {
projects.map(project => {
let { planEndTime, name, gantts } = project;
const gantt = getGanttStyle(project);
gantt.background = colors.value[project.state];
gantt.background = colors.value[project.state - 1];
if (gantts) {
gantts.push(gantt);

View File

@ -12,6 +12,7 @@
</template>
<div class="detail-table">
<div class="button-title">
<span>申报时段</span>
<el-select v-model="searchParams.applyId" placeholder="请选择" style="margin-right: 10px">
<el-option v-for="item in applyTimeArr" :label="item.name" :value="item.id" />
</el-select>
@ -31,14 +32,19 @@
<el-table-column prop="reportContent" label="汇报内容" align="left"> </el-table-column>
<el-table-column prop="totalAmount" label="总工程造价(元)">
<template #default="scope">
<el-input v-if="scope.row.symbolSum" v-model.number="countData[scope.row.key]" placeholder="请输入"></el-input>
<el-input
disabled
v-if="scope.row.symbolSum"
v-model.number="countData[scope.row.key]"
placeholder="请输入"
></el-input>
</template>
</el-table-column>
<el-table-column prop="completeAmount" label="本期完成工程造价(元)" width="200"> </el-table-column>
<el-table-column prop="lastEndAmount" label="至上期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="nowEndAmount" label="至本期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column>
<!-- <el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column> -->
<el-table-column align="left" label="操作">
<template #default="scope">
<el-button type="primary" v-if="scope.row.id" link @click="handleEditItem(scope.row)">
@ -101,13 +107,13 @@
<el-table-column prop="endAmount" label="金额(元)"> </el-table-column>
</el-table-column>
<el-table-column prop="remark" label="备注"> </el-table-column>
<el-table-column align="left" label="操作">
<!-- <template #default="scope">
<!-- <el-table-column align="left" label="操作">
<template #default="scope">
<el-button v-if="scope.row.parentId == 0" type="primary" link :icon="CirclePlus" @click="openAdd2(scope.row)"
>子分项</el-button
>
</template> -->
</el-table-column>
</template>
</el-table-column> -->
<!-- 表格无数据情况 -->
<template #empty>
<div class="table-empty">
@ -189,17 +195,17 @@ const formConfig = {
label: "至本期末完成工程造价(元)",
prop: "nowEndAmount",
type: "input"
},
{
label: "本期完成形象进度(%)",
prop: "scheduleRatio",
type: "input"
},
{
label: "至本期末完成形象进度(%)",
prop: "completeScheduleRatio",
type: "input"
}
// {
// label: "(%)",
// prop: "scheduleRatio",
// type: "input"
// },
// {
// label: "(%)",
// prop: "completeScheduleRatio",
// type: "input"
// }
],
rules: {
reportContent: [
@ -481,8 +487,10 @@ const getApplyTimeList = async () => {
applyTimeArr.value = res.result;
if (res && res.result.length > 0) {
searchParams.value.applyId = res.result[0].id;
getSubItemList();
} else {
recordData.value = [];
}
getSubItemList();
console.log(res, "----------申报时段");
};
const submitCount = async () => {
@ -531,12 +539,24 @@ const getSubItemList = async () => {
const res2 = await payCountList({ investmentApplyId: searchParams.value.applyId });
console.log(res, "-----子项数据");
console.log(res2, "-----子项统计数据");
if (!res.result || !res2.result) {
symbolArr.value = JSON.parse(JSON.stringify(res.result.records));
if (res2.result) {
countData.value = JSON.parse(JSON.stringify(res2.result));
} else {
countData.value = reactive({
constructionCost: 0,
payment: 0,
advanceCharge: 0,
unPayment: 0,
applyPayment: 0,
scheduleRatio: 0,
completeScheduleRatio: 0
});
}
if (!res.result || res.result.records.length == 0) {
recordData.value = [];
return;
}
symbolArr.value = JSON.parse(JSON.stringify(res.result.records));
countData.value = JSON.parse(JSON.stringify(res2.result));
let sumRowData = {
//
reportContent: "合计:",
@ -615,7 +635,7 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
console.log(symbolArr.value.length);
if (rowIndex > symbolArr.value.length) {
if (columnIndex === 1) {
return [1, 7];
return [1, 5];
} else if (columnIndex > 2) {
return [0, 0];
}
@ -647,6 +667,7 @@ watch(
(n, o) => {
visible1.value = n;
if (n) {
searchParams.value.applyId = "";
getApplyTimeList();
} else {
emits("confirm");
@ -717,6 +738,10 @@ onMounted(() => {});
.button-title {
@include flex;
> span {
font-size: 16px;
color: var(--el-menu-text-color);
}
}
.table {

View File

@ -38,8 +38,8 @@
<el-table-column prop="completeAmount" label="本期完成工程造价(元)" width="200"> </el-table-column>
<el-table-column prop="lastEndAmount" label="至上期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="nowEndAmount" label="至本期末完成工程造价(元)" width="220"> </el-table-column>
<el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column>
<!-- <el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column> -->
<el-table-column align="left" label="操作">
<template #default="scope">
<el-button type="primary" v-if="scope.row.id" link @click="handleEditItem(scope.row)">
@ -189,17 +189,17 @@ const formConfig = {
label: "至本期末完成工程造价(元)",
prop: "nowEndAmount",
type: "input"
},
{
label: "本期完成形象进度(%)",
prop: "scheduleRatio",
type: "input"
},
{
label: "至本期末完成形象进度(%)",
prop: "completeScheduleRatio",
type: "input"
}
// {
// label: "(%)",
// prop: "scheduleRatio",
// type: "input"
// },
// {
// label: "(%)",
// prop: "completeScheduleRatio",
// type: "input"
// }
],
rules: {
reportContent: [
@ -613,7 +613,7 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
console.log(symbolArr.value.length);
if (rowIndex > symbolArr.value.length) {
if (columnIndex === 1) {
return [1, 7];
return [1, 5];
} else if (columnIndex > 2) {
return [0, 0];
}