fix: BUG修改
This commit is contained in:
parent
94d9dfaef0
commit
c8ac1c7b1c
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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];
|
||||
}
|
||||
|
||||
@ -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使用ActiveX的clsid
|
||||
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;
|
||||
// // 程序未启动时执行error函数,采用wakeup来启动程序
|
||||
// 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("插件未启动,正在尝试启动,请稍候...");
|
||||
// // 程序未启动时执行error函数,采用wakeup来启动程序
|
||||
// window.WebControl.JS_WakeUp("VideoWebPlugin://");
|
||||
// setTimeout(() => {
|
||||
// initPlugin();
|
||||
// }, 3000);
|
||||
// initCount.value++;
|
||||
// } else {
|
||||
// window.location.href = this.videoWebPluginUrl;
|
||||
// }
|
||||
},
|
||||
cbConnectClose: () => {
|
||||
// 异常断开:bNormalClose = false
|
||||
// JS_Disconnect正常断开:bNormalClose = 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; //综合安防管理平台端口,若启用HTTPS协议,默认443
|
||||
let snapDir = "D:\\SnapDir"; //抓图存储路径
|
||||
let videoDir = "D:\\VideoDir"; //紧急录像或录像剪辑存储路径
|
||||
let layout = objData.value.layout; //playMode指定模式的布局
|
||||
let enableHTTPS = 1; //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
|
||||
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, //API网关提供的appkey
|
||||
secret: secret, //API网关提供的secret
|
||||
ip: ip, //API网关IP地址
|
||||
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); // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
|
||||
|
||||
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");
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user