Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd
commit
70f43b3973
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar yanzhu-auth/target/yanzhu-auth.jar
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar yanzhu-gateway/target/yanzhu-gateway.jar
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar yanzhu-modules/yanzhu-file/target/yanzhu-modules-file.jar
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar ruoyi-modules/ruoyi-gen/target/yanzhu-modules-gen.jar
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar ruoyi-modules/ruoyi-job/target/yanzhu-modules-job.jar
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar yanzhu-modules/yanzhu-manage/target/yanzhu-modules-manage.jar
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar yanzhu-modules/yanzhu-system/target/yanzhu-modules-system.jar
|
|
@ -0,0 +1 @@
|
|||
java -Dfile.encoding=utf-8 -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar ruoyi-visual/ruoyi-monitor/target/yanzhu-visual-monitor.jar
|
|
@ -0,0 +1 @@
|
|||
mvn clean package -Dmaven.test.skip=true
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 打包Web工程,生成war/jar包文件。
|
||||
echo [信息] 打包Web工程,生成war/jar包文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Auth<74><68><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
|
||||
cd %~dp0
|
||||
cd ../yanzhu-auth/target
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Gateway<61><79><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
|
||||
cd %~dp0
|
||||
cd ../yanzhu-gateway/target
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-File<6C><65><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
|
||||
cd %~dp0
|
||||
cd ../yanzhu-modules/yanzhu-file/target
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Gen<65><6E><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-gen/target
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Job<6F><62><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-job/target
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [ Ϣ] ʹ Jar Modules-System ̡
|
||||
echo.
|
||||
|
||||
|
||||
cd %~dp0
|
||||
cd ../yanzhu-modules/yanzhu-manage/target
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-System<65><6D><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
|
||||
cd %~dp0
|
||||
cd ../yanzhu-modules/yanzhu-system/target
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Monitor<6F><72><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-visual/ruoyi-monitor/target
|
||||
|
|
|
@ -99,10 +99,89 @@ const milestoneList = (data) => {
|
|||
});
|
||||
});
|
||||
};
|
||||
|
||||
const costOutputSelectYearAndMonth=(data)=> {
|
||||
return new Promise(reslove=>{
|
||||
let data2={...data};
|
||||
let y=data2.year;
|
||||
let m=data2.month-1;
|
||||
if(m==0){
|
||||
m=12;
|
||||
y--;
|
||||
}
|
||||
data2.year=y;
|
||||
data2.month=m;
|
||||
var ajaxs=[request({
|
||||
url: `/manage/costOutput/selectYearAndMonth`,
|
||||
method: 'post',
|
||||
data:data
|
||||
}),
|
||||
request({
|
||||
url: `/manage/costOutput/selectYearAndMonth`,
|
||||
method: 'post',
|
||||
data:data2
|
||||
})];
|
||||
|
||||
axios.all(ajaxs).then(res=>{
|
||||
let d=res[0]
|
||||
const getValue=(tmps,type)=>{
|
||||
let objs=tmps.filter(d=>d.costType==type);
|
||||
return objs.length>0?objs[0]:{};
|
||||
}
|
||||
let tmps=(d.data||[]).map(it=>{
|
||||
it.money=it.money?it.money/10000.0:0;
|
||||
return it;
|
||||
});
|
||||
let y=data.year;
|
||||
let m=data.month-1;
|
||||
if(m==0){
|
||||
m=12;
|
||||
y--;
|
||||
}
|
||||
let tmps2=(res[1].data||[]).map(it=>{
|
||||
it.money=it.money?it.money/10000.0:0;
|
||||
return it;
|
||||
});
|
||||
let curM=tmps2.filter(it=>it.costType==9 && it.year==y && it.month==m);
|
||||
curM=curM.length>0?curM[0]:{};
|
||||
|
||||
let totalObjs=tmps.filter(it=>it.costType==9);
|
||||
let total=0;
|
||||
totalObjs.forEach(it=>{
|
||||
if(it.money){
|
||||
total+=it.money;
|
||||
}
|
||||
});
|
||||
let yearObjs=tmps.filter(it=>it.costType==9 && it.year==y);
|
||||
let totalY=0;
|
||||
yearObjs.forEach(it=>{
|
||||
if(it.money){
|
||||
totalY+=it.money;
|
||||
}
|
||||
});
|
||||
let obj={
|
||||
totalInv:getValue(tmps,1).money||0,//总投资
|
||||
curYear:getValue(tmps,2).money||0,//年总投资
|
||||
contract1:getValue(tmps,3).money||0,//合同金额
|
||||
contract2:getValue(tmps,4).money||0,//合同支付金额
|
||||
contract3:getValue(tmps,5).money||0,//合同挂账金额
|
||||
safety1:getValue(tmps,6).money||0,//安措金额
|
||||
safety2:getValue(tmps,7).money||0,//安措支付金额
|
||||
safety3:getValue(tmps,8).money||0,//安措挂账金额
|
||||
curMonth:curM.money||0,//当月投资
|
||||
totalMonth:total,//开累投资
|
||||
totalYear:totalY,//本年完成
|
||||
}
|
||||
reslove(obj);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
groupByCraftType,
|
||||
groupByCraftTypeByAttendance,
|
||||
subdeptsUsersList,
|
||||
attendanceUbiDataList,
|
||||
milestoneList,
|
||||
costOutputSelectYearAndMonth
|
||||
};
|
||||
|
|
|
@ -76,7 +76,6 @@ service.interceptors.response.use(res => {
|
|||
return res.data
|
||||
}
|
||||
if (code === 401) {
|
||||
debugger
|
||||
if (!isRelogin.show) {
|
||||
isRelogin.show = true;
|
||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
总投资
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ 1000 }}</span> 万元
|
||||
<span class="led-number">{{ costOutData.totalInv||0 }}</span> 万元
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -237,7 +237,7 @@
|
|||
本月完成
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ 1000 }}</span> 万元
|
||||
<span class="led-number">{{ costOutData.curMonth||0 }}</span> 万元
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -251,7 +251,7 @@
|
|||
本年完成
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ 1000 }}</span> 万元
|
||||
<span class="led-number">{{ costOutData.totalYear||0 }}</span> 万元
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -265,7 +265,7 @@
|
|||
开累完成
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ 1000 }}</span> 万元
|
||||
<span class="led-number">{{ costOutData.totalMonth||0 }}</span> 万元
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -280,7 +280,7 @@
|
|||
计划开工日期
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ new Date() | toDate }}</span>
|
||||
<span class="led-number">{{ selProject.scheduledStartTime | toDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -295,7 +295,7 @@
|
|||
计划竣工日期
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ new Date() | toDate }}</span>
|
||||
<span class="led-number">{{ selProject.plannedCompletionTime | toDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -309,7 +309,7 @@
|
|||
实际开工日期
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ new Date() | toDate }}</span>
|
||||
<span class="led-number">{{ selProject.actualOperatingTime | toDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -323,7 +323,7 @@
|
|||
合同工期
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ 2100 }}</span> 天
|
||||
<span class="led-number">{{ selProject.projectTimeLimit||'' }}</span> 天
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -338,7 +338,7 @@
|
|||
建筑面积
|
||||
</p>
|
||||
<div>
|
||||
<span class="led-number">{{ 10000 }}</span> 平方米
|
||||
<span class="led-number">{{ selProject.floorArea||'' }}</span> 平方米
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -503,7 +503,6 @@ import projectInfoDialog from './detail/projectInfoDialog.vue';
|
|||
import staffSurveyChart from '@/components/staffSurveyChart.vue';
|
||||
import MonitAndWarning from './components/MonitAndWarning.vue';
|
||||
import attendanceInfoDlg from './detail/attendanceInfoDlg.vue';
|
||||
import testData from './test/detail'
|
||||
import debounce from 'lodash.debounce'
|
||||
export default {
|
||||
components: {
|
||||
|
@ -549,6 +548,7 @@ export default {
|
|||
projectBuildNode: [],
|
||||
maxWidth: 0,
|
||||
minWidth: 100,
|
||||
costOutData:{},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -615,13 +615,25 @@ export default {
|
|||
});
|
||||
this.loadAttendanceData();
|
||||
this.loadMilestoneData();
|
||||
this.loadCostOutput();
|
||||
},
|
||||
loadMilestoneData() {
|
||||
loadCostOutput(){
|
||||
let dt = this.$dt(new Date());
|
||||
this.$api.detail.costOutputSelectYearAndMonth({
|
||||
comId: this.selProject.comId,
|
||||
projectId: this.selProject.id,
|
||||
year: dt.$y,
|
||||
month: dt.$M + 1,
|
||||
}).then(d=>{
|
||||
this.costOutData=d;
|
||||
});
|
||||
},
|
||||
loadMilestoneData() {
|
||||
this.$api.detail.milestoneList({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
comId: this.prjInfo.comId,
|
||||
projectId: this.prjInfo.id
|
||||
comId: this.selProject.comId,
|
||||
projectId: this.selProject.id
|
||||
}).then(d => {
|
||||
this.projectBuildNode = d;
|
||||
let itemWidth = this.$dpi() == "1K" ? 200 : this.$dpi() == "2K" ? 300 : 500;
|
||||
|
@ -638,8 +650,8 @@ export default {
|
|||
loadAttendanceData() {
|
||||
let ajax = this.$api.detail.groupByCraftType;
|
||||
let posData = {
|
||||
comId: this.prjInfo.comId,
|
||||
projectId: this.prjInfo.id
|
||||
comId: this.selProject.comId,
|
||||
projectId: this.selProject.id
|
||||
}
|
||||
if (this.attendanceNav == 1) {
|
||||
ajax = this.$api.detail.groupByCraftTypeByAttendance;
|
||||
|
|
|
@ -0,0 +1,231 @@
|
|||
package com.yanzhu.manage.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.yanzhu.common.core.annotation.Excel;
|
||||
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 延迟摄影管理对象 pro_video_monitor
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
public class ProVideoMonitor extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long comId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long projectId;
|
||||
|
||||
/** 监控名称 */
|
||||
@Excel(name = "监控名称")
|
||||
private String monitorName;
|
||||
|
||||
/** 监控类型 */
|
||||
@Excel(name = "监控类型")
|
||||
private String monitorType;
|
||||
|
||||
/** 监控连接 */
|
||||
@Excel(name = "监控连接")
|
||||
private String url;
|
||||
|
||||
/** AppKey */
|
||||
@Excel(name = "AppKey")
|
||||
private String appkey;
|
||||
|
||||
/** Secret */
|
||||
@Excel(name = "Secret")
|
||||
private String secret;
|
||||
|
||||
/** 设备厂商 */
|
||||
@Excel(name = "设备厂商")
|
||||
private String manufacturer;
|
||||
|
||||
/** 是否关键点 */
|
||||
@Excel(name = "是否关键点")
|
||||
private Long keyPoint;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long state;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isDel;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date upadteTime;
|
||||
private String compName;
|
||||
|
||||
private String projectName;
|
||||
|
||||
public String getCompName() {
|
||||
return compName;
|
||||
}
|
||||
|
||||
public void setCompName(String compName) {
|
||||
this.compName = compName;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setMonitorName(String monitorName)
|
||||
{
|
||||
this.monitorName = monitorName;
|
||||
}
|
||||
|
||||
public String getMonitorName()
|
||||
{
|
||||
return monitorName;
|
||||
}
|
||||
public void setMonitorType(String monitorType)
|
||||
{
|
||||
this.monitorType = monitorType;
|
||||
}
|
||||
|
||||
public String getMonitorType()
|
||||
{
|
||||
return monitorType;
|
||||
}
|
||||
public void setUrl(String url)
|
||||
{
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getUrl()
|
||||
{
|
||||
return url;
|
||||
}
|
||||
public void setAppkey(String appkey)
|
||||
{
|
||||
this.appkey = appkey;
|
||||
}
|
||||
|
||||
public String getAppkey()
|
||||
{
|
||||
return appkey;
|
||||
}
|
||||
public void setSecret(String secret)
|
||||
{
|
||||
this.secret = secret;
|
||||
}
|
||||
|
||||
public String getSecret()
|
||||
{
|
||||
return secret;
|
||||
}
|
||||
public void setManufacturer(String manufacturer)
|
||||
{
|
||||
this.manufacturer = manufacturer;
|
||||
}
|
||||
|
||||
public String getManufacturer()
|
||||
{
|
||||
return manufacturer;
|
||||
}
|
||||
public void setKeyPoint(Long keyPoint)
|
||||
{
|
||||
this.keyPoint = keyPoint;
|
||||
}
|
||||
|
||||
public Long getKeyPoint()
|
||||
{
|
||||
return keyPoint;
|
||||
}
|
||||
public void setState(Long state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setIsDel(Long isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public Long getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
public void setUpadteTime(Date upadteTime)
|
||||
{
|
||||
this.upadteTime = upadteTime;
|
||||
}
|
||||
|
||||
public Date getUpadteTime()
|
||||
{
|
||||
return upadteTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("monitorName", getMonitorName())
|
||||
.append("monitorType", getMonitorType())
|
||||
.append("url", getUrl())
|
||||
.append("appkey", getAppkey())
|
||||
.append("secret", getSecret())
|
||||
.append("manufacturer", getManufacturer())
|
||||
.append("keyPoint", getKeyPoint())
|
||||
.append("remark", getRemark())
|
||||
.append("state", getState())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("upadteTime", getUpadteTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.manage.domain.ProVideoMonitor;
|
||||
|
||||
/**
|
||||
* 延迟摄影管理Mapper接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
public interface ProVideoMonitorMapper
|
||||
{
|
||||
/**
|
||||
* 查询延迟摄影管理
|
||||
*
|
||||
* @param id 延迟摄影管理主键
|
||||
* @return 延迟摄影管理
|
||||
*/
|
||||
public ProVideoMonitor selectProVideoMonitorById(Long id);
|
||||
|
||||
/**
|
||||
* 查询延迟摄影管理列表
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 延迟摄影管理集合
|
||||
*/
|
||||
public List<ProVideoMonitor> selectProVideoMonitorList(ProVideoMonitor proVideoMonitor);
|
||||
|
||||
/**
|
||||
* 新增延迟摄影管理
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProVideoMonitor(ProVideoMonitor proVideoMonitor);
|
||||
|
||||
/**
|
||||
* 修改延迟摄影管理
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProVideoMonitor(ProVideoMonitor proVideoMonitor);
|
||||
|
||||
/**
|
||||
* 删除延迟摄影管理
|
||||
*
|
||||
* @param id 延迟摄影管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProVideoMonitorById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除延迟摄影管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProVideoMonitorByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.manage.mapper.ProVideoMonitorMapper">
|
||||
|
||||
<resultMap type="ProVideoMonitor" id="ProVideoMonitorResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="monitorName" column="monitor_name" />
|
||||
<result property="monitorType" column="monitor_type" />
|
||||
<result property="url" column="url" />
|
||||
<result property="appkey" column="appkey" />
|
||||
<result property="secret" column="secret" />
|
||||
<result property="manufacturer" column="manufacturer" />
|
||||
<result property="keyPoint" column="key_point" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="state" column="state" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="upadteTime" column="upadte_time" />
|
||||
<result property="compName" column="comp_name"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProVideoMonitorVo">
|
||||
select pv.id, pv.com_id, pv.project_id, pv.monitor_name, pv.monitor_type, pv.url, pv.appkey, pv.secret,
|
||||
pv.manufacturer, pv.key_point, pv.remark, pv.state, pv.is_del, pv.create_by, pv.create_time,
|
||||
pv.update_by, pv.upadte_time,dp.`dept_name` comp_name,pi.`project_name`
|
||||
from pro_video_monitor pv
|
||||
LEFT JOIN sys_dept dp ON pv.com_id=dp.dept_id
|
||||
LEFT JOIN pro_project_info pi ON pv.project_id=pi.id
|
||||
</sql>
|
||||
|
||||
<select id="selectProVideoMonitorList" parameterType="ProVideoMonitor" resultMap="ProVideoMonitorResult">
|
||||
<include refid="selectProVideoMonitorVo"/>
|
||||
<where>
|
||||
<if test="comId != null "> and pv.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and pv.project_id = #{projectId}</if>
|
||||
<if test="monitorName != null and monitorName != ''"> and pv.monitor_name like concat('%', #{monitorName}, '%')</if>
|
||||
<if test="monitorType != null and monitorType != ''"> and pv.monitor_type = #{monitorType}</if>
|
||||
<if test="url != null and url != ''"> and pv.url = #{url}</if>
|
||||
<if test="appkey != null and appkey != ''"> and pv.appkey = #{appkey}</if>
|
||||
<if test="secret != null and secret != ''"> and pv.secret = #{secret}</if>
|
||||
<if test="manufacturer != null and manufacturer != ''"> and pv.manufacturer = #{manufacturer}</if>
|
||||
<if test="keyPoint != null "> and pv.key_point = #{keyPoint}</if>
|
||||
<if test="state != null "> and pv.state = #{state}</if>
|
||||
<if test="isDel != null "> and pv.is_del = #{isDel}</if>
|
||||
<if test="upadteTime != null "> and pv.upadte_time = #{upadteTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProVideoMonitorById" parameterType="Long" resultMap="ProVideoMonitorResult">
|
||||
<include refid="selectProVideoMonitorVo"/>
|
||||
where pv.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProVideoMonitor" parameterType="ProVideoMonitor" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pro_video_monitor
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="monitorName != null">monitor_name,</if>
|
||||
<if test="monitorType != null">monitor_type,</if>
|
||||
<if test="url != null">url,</if>
|
||||
<if test="appkey != null">appkey,</if>
|
||||
<if test="secret != null">secret,</if>
|
||||
<if test="manufacturer != null">manufacturer,</if>
|
||||
<if test="keyPoint != null">key_point,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="state != null">state,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="upadteTime != null">upadte_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="monitorName != null">#{monitorName},</if>
|
||||
<if test="monitorType != null">#{monitorType},</if>
|
||||
<if test="url != null">#{url},</if>
|
||||
<if test="appkey != null">#{appkey},</if>
|
||||
<if test="secret != null">#{secret},</if>
|
||||
<if test="manufacturer != null">#{manufacturer},</if>
|
||||
<if test="keyPoint != null">#{keyPoint},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="upadteTime != null">#{upadteTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProVideoMonitor" parameterType="ProVideoMonitor">
|
||||
update pro_video_monitor
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="monitorName != null">monitor_name = #{monitorName},</if>
|
||||
<if test="monitorType != null">monitor_type = #{monitorType},</if>
|
||||
<if test="url != null">url = #{url},</if>
|
||||
<if test="appkey != null">appkey = #{appkey},</if>
|
||||
<if test="secret != null">secret = #{secret},</if>
|
||||
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
|
||||
<if test="keyPoint != null">key_point = #{keyPoint},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="upadteTime != null">upadte_time = #{upadteTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProVideoMonitorById" parameterType="Long">
|
||||
delete from pro_video_monitor where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProVideoMonitorByIds" parameterType="String">
|
||||
delete from pro_video_monitor where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -1 +1 @@
|
|||
如果使用的是RuoYi-Cloud-Vue3前端,那么需要覆盖一下此目录的模板index.vue.vm、index-tree.vue.vm文件到上级vue目录。
|
||||
如果使用的是RuoYi-Cloud-Vue3前端,那么需要覆盖一下此目录的模板index.vue.vm、index-tree.vue.vm文件到上级vue目录。
|
|
@ -123,7 +123,7 @@
|
|||
<artifactId>iTextAsian</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${pom.basedir}\libs\iTextAsian-1.0.0.jar</systemPath>
|
||||
<systemPath>${pom.basedir}/libs/iTextAsian-1.0.0.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -143,7 +143,7 @@
|
|||
<artifactId>aspose-words</artifactId>
|
||||
<version>15.8.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${pom.basedir}\libs\aspose-words-15.8.0-jdk16.jar</systemPath>
|
||||
<systemPath>${pom.basedir}/libs/aspose-words-15.8.0-jdk16.jar</systemPath>
|
||||
</dependency>
|
||||
<!--word文件转化为PDF文件 结束-->
|
||||
|
||||
|
@ -166,9 +166,13 @@
|
|||
<artifactId>aspose-tasks</artifactId>
|
||||
<version>24.10</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${pom.basedir}\libs\aspose-tasks-24.10-jdk17.jar</systemPath>
|
||||
<systemPath>${pom.basedir}/libs/aspose-tasks-24.10-jdk17.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.mpxj</groupId>
|
||||
<artifactId>mpxj</artifactId>
|
||||
<version>13.5.1</version> <!-- 请检查最新版本 -->
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -142,4 +142,59 @@ public class ProCostOutputController extends BaseController
|
|||
Map<String,List<List<ProCostOutput>>> list=proCostOutputService.selectForBigEnginList(where);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按项目ID查询,如果没有数据进行初始化
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/listByProjectId")
|
||||
public AjaxResult listByProjectId(long projectId,long comId){
|
||||
ProCostOutput where =new ProCostOutput();
|
||||
where.setProjectId(projectId);
|
||||
where.setComId(comId);
|
||||
List<ProCostOutput> list=proCostOutputService.selectProCostOutputList(where);
|
||||
if(list.size()==0){
|
||||
proCostOutputService.initProject(projectId,comId);
|
||||
}
|
||||
list=proCostOutputService.selectProCostOutputList(where);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 增加年度投资
|
||||
* @param projectId
|
||||
* @param year
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addYearInvestment")
|
||||
public AjaxResult addYearInvestment(@RequestBody ProCostOutput where){
|
||||
List<ProCostOutput> list=proCostOutputService.selectProCostOutputList(where);
|
||||
if(list.size()==0){
|
||||
proCostOutputService.addYearInvestment(where);
|
||||
return AjaxResult.success("增加年度投资成功!");
|
||||
}else{
|
||||
return AjaxResult.error("此年度投资已存在!");
|
||||
}
|
||||
}
|
||||
@PostMapping("/addMonthInvestment")
|
||||
public AjaxResult addMonthInvestment(@RequestBody ProCostOutput where) {
|
||||
List<ProCostOutput> list=proCostOutputService.selectProCostOutputList(where);
|
||||
if(list.size()==0){
|
||||
proCostOutputService.addMonthInvestment(where);
|
||||
return AjaxResult.success("增加月度投资成功!");
|
||||
}else{
|
||||
return AjaxResult.error("此月度投资已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/batchUpdate")
|
||||
public AjaxResult batchUpdate(@RequestBody List<ProCostOutput> list){
|
||||
try {
|
||||
proCostOutputService.batchUpdate(list);
|
||||
return AjaxResult.success("保存成功!");
|
||||
}catch (Exception ex){
|
||||
return AjaxResult.error(ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
package com.yanzhu.manage.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yanzhu.common.core.utils.http.HttpUtils;
|
||||
import com.yanzhu.common.core.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.common.core.web.controller.BaseController;
|
||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||
import com.yanzhu.common.core.web.page.TableDataInfo;
|
||||
import com.yanzhu.common.log.annotation.Log;
|
||||
import com.yanzhu.common.log.enums.BusinessType;
|
||||
import com.yanzhu.common.redis.service.RedisService;
|
||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||
import com.yanzhu.manage.domain.ProVideoMonitor;
|
||||
import com.yanzhu.manage.service.IProVideoMonitorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
/**
|
||||
* 延迟摄影管理Controller
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/videoMonitor")
|
||||
public class ProVideoMonitorController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProVideoMonitorService proVideoMonitorService;
|
||||
|
||||
/**
|
||||
* 查询延迟摄影管理列表
|
||||
*/
|
||||
@RequiresPermissions("manage:videoMonitor:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProVideoMonitor proVideoMonitor)
|
||||
{
|
||||
startPage();
|
||||
List<ProVideoMonitor> list = proVideoMonitorService.selectProVideoMonitorList(proVideoMonitor);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出延迟摄影管理列表
|
||||
*/
|
||||
@RequiresPermissions("manage:videoMonitor:export")
|
||||
@Log(title = "延迟摄影管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProVideoMonitor proVideoMonitor)
|
||||
{
|
||||
List<ProVideoMonitor> list = proVideoMonitorService.selectProVideoMonitorList(proVideoMonitor);
|
||||
ExcelUtil<ProVideoMonitor> util = new ExcelUtil<ProVideoMonitor>(ProVideoMonitor.class);
|
||||
util.exportExcel(response, list, "延迟摄影管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取延迟摄影管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("manage:videoMonitor:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(proVideoMonitorService.selectProVideoMonitorById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增延迟摄影管理
|
||||
*/
|
||||
@RequiresPermissions("manage:videoMonitor:add")
|
||||
@Log(title = "延迟摄影管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProVideoMonitor proVideoMonitor)
|
||||
{
|
||||
return toAjax(proVideoMonitorService.insertProVideoMonitor(proVideoMonitor));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改延迟摄影管理
|
||||
*/
|
||||
@RequiresPermissions("manage:videoMonitor:edit")
|
||||
@Log(title = "延迟摄影管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProVideoMonitor proVideoMonitor)
|
||||
{
|
||||
return toAjax(proVideoMonitorService.updateProVideoMonitor(proVideoMonitor));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除延迟摄影管理
|
||||
*/
|
||||
@RequiresPermissions("manage:videoMonitor:remove")
|
||||
@Log(title = "延迟摄影管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(proVideoMonitorService.deleteProVideoMonitorByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@RequiresPermissions("manage:videoMonitor:list")
|
||||
@GetMapping("/getYsToken/{id}")
|
||||
public AjaxResult getYsToken(@PathVariable Long id){
|
||||
ProVideoMonitor proVideoMonitor = proVideoMonitorService.selectProVideoMonitorById(id);
|
||||
if(proVideoMonitor == null){
|
||||
return AjaxResult.error("无效ID");
|
||||
}
|
||||
String key="YS_Token__"+ proVideoMonitor.getAppkey()+"_"+proVideoMonitor.getSecret();
|
||||
JSONObject jo=redisService.getCacheObject(key);
|
||||
String token="";
|
||||
if(jo!=null){
|
||||
long expireTime= jo.getLong("expireTime");
|
||||
if(expireTime> System.currentTimeMillis()+1000*60){
|
||||
token=jo.getString("accessToken");
|
||||
return AjaxResult.success(token);
|
||||
}
|
||||
}
|
||||
String postData="appKey="+proVideoMonitor.getAppkey()+"&appSecret="+proVideoMonitor.getSecret();
|
||||
String url="https://open.ys7.com/api/lapp/token/get";
|
||||
String data= HttpUtils.sendPost(url,postData);
|
||||
jo=JSONObject.parseObject(data);
|
||||
if("200".equals(jo.getString("code"))){
|
||||
JSONObject jobj=jo.getJSONObject("data");
|
||||
token=jobj.getString("accessToken");
|
||||
long expireTime= jobj.getLong("expireTime");
|
||||
redisService.setCacheObject(key,jobj,expireTime-System.currentTimeMillis(), TimeUnit.MICROSECONDS);
|
||||
}
|
||||
return AjaxResult.success(token);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.manage.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.manage.domain.ProVideoMonitor;
|
||||
|
||||
/**
|
||||
* 延迟摄影管理Service接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
public interface IProVideoMonitorService
|
||||
{
|
||||
/**
|
||||
* 查询延迟摄影管理
|
||||
*
|
||||
* @param id 延迟摄影管理主键
|
||||
* @return 延迟摄影管理
|
||||
*/
|
||||
public ProVideoMonitor selectProVideoMonitorById(Long id);
|
||||
|
||||
/**
|
||||
* 查询延迟摄影管理列表
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 延迟摄影管理集合
|
||||
*/
|
||||
public List<ProVideoMonitor> selectProVideoMonitorList(ProVideoMonitor proVideoMonitor);
|
||||
|
||||
/**
|
||||
* 新增延迟摄影管理
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProVideoMonitor(ProVideoMonitor proVideoMonitor);
|
||||
|
||||
/**
|
||||
* 修改延迟摄影管理
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProVideoMonitor(ProVideoMonitor proVideoMonitor);
|
||||
|
||||
/**
|
||||
* 批量删除延迟摄影管理
|
||||
*
|
||||
* @param ids 需要删除的延迟摄影管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProVideoMonitorByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除延迟摄影管理信息
|
||||
*
|
||||
* @param id 延迟摄影管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProVideoMonitorById(Long id);
|
||||
}
|
|
@ -118,19 +118,19 @@ public class ProCostOutputServiceImpl implements IProCostOutputService
|
|||
insertProCostOutput(it);
|
||||
it.setYear(null);
|
||||
it.setCostType(3l);//合同金额
|
||||
insertProCostOutput(it);
|
||||
//insertProCostOutput(it);
|
||||
it.setCostType(4l);//合同支付金额
|
||||
insertProCostOutput(it);
|
||||
//insertProCostOutput(it);
|
||||
it.setCostType(5l);//合同挂账金额
|
||||
insertProCostOutput(it);
|
||||
//insertProCostOutput(it);
|
||||
it.setCostType(6l);//安措金额
|
||||
insertProCostOutput(it);
|
||||
//insertProCostOutput(it);
|
||||
it.setCostType(7l);//安措支付金额
|
||||
insertProCostOutput(it);
|
||||
//insertProCostOutput(it);
|
||||
it.setCostType(8l);//安措挂账金额
|
||||
insertProCostOutput(it);
|
||||
//insertProCostOutput(it);
|
||||
it.setCostType(10l);//建安费金额
|
||||
insertProCostOutput(it);
|
||||
//insertProCostOutput(it);
|
||||
it.setCostType(9l);//月度投资
|
||||
it.setYear(year*1l);
|
||||
for(int i=1;i<=12;i++){
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
package com.yanzhu.manage.service.impl;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.yanzhu.common.core.context.SecurityContextHolder;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import com.yanzhu.manage.domain.ProVideoMonitor;
|
||||
import com.yanzhu.manage.mapper.ProVideoMonitorMapper;
|
||||
import com.yanzhu.manage.service.IProVideoMonitorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 延迟摄影管理Service业务层处理
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
@Service
|
||||
public class ProVideoMonitorServiceImpl implements IProVideoMonitorService
|
||||
{
|
||||
@Autowired
|
||||
private ProVideoMonitorMapper proVideoMonitorMapper;
|
||||
|
||||
/**
|
||||
* 查询延迟摄影管理
|
||||
*
|
||||
* @param id 延迟摄影管理主键
|
||||
* @return 延迟摄影管理
|
||||
*/
|
||||
@Override
|
||||
public ProVideoMonitor selectProVideoMonitorById(Long id)
|
||||
{
|
||||
return proVideoMonitorMapper.selectProVideoMonitorById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询延迟摄影管理列表
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 延迟摄影管理
|
||||
*/
|
||||
@Override
|
||||
public List<ProVideoMonitor> selectProVideoMonitorList(ProVideoMonitor proVideoMonitor)
|
||||
{
|
||||
return proVideoMonitorMapper.selectProVideoMonitorList(proVideoMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增延迟摄影管理
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProVideoMonitor(ProVideoMonitor proVideoMonitor)
|
||||
{
|
||||
proVideoMonitor.setCreateBy(SecurityContextHolder.getUserName());
|
||||
proVideoMonitor.setCreateTime(DateUtils.getNowDate());
|
||||
return proVideoMonitorMapper.insertProVideoMonitor(proVideoMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改延迟摄影管理
|
||||
*
|
||||
* @param proVideoMonitor 延迟摄影管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProVideoMonitor(ProVideoMonitor proVideoMonitor)
|
||||
{
|
||||
proVideoMonitor.setUpdateBy(SecurityContextHolder.getUserName());
|
||||
return proVideoMonitorMapper.updateProVideoMonitor(proVideoMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除延迟摄影管理
|
||||
*
|
||||
* @param ids 需要删除的延迟摄影管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProVideoMonitorByIds(Long[] ids)
|
||||
{
|
||||
return proVideoMonitorMapper.deleteProVideoMonitorByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除延迟摄影管理信息
|
||||
*
|
||||
* @param id 延迟摄影管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProVideoMonitorById(Long id)
|
||||
{
|
||||
return proVideoMonitorMapper.deleteProVideoMonitorById(id);
|
||||
}
|
||||
}
|
|
@ -63,5 +63,11 @@ onMounted(() => {
|
|||
top: 16px;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
:focus-visible {
|
||||
outline: none !important;
|
||||
}
|
||||
.command{
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -42,3 +42,36 @@ export function delCostOutput(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function listByProjectId(query){
|
||||
return request({
|
||||
url: '/manage/costOutput/listByProjectId',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function addYearInvestment(data){
|
||||
return request({
|
||||
url: '/manage/costOutput/addYearInvestment',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
export function addMonthInvestment(data){
|
||||
return request({
|
||||
url: '/manage/costOutput/addMonthInvestment',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
export function batchUpdate(datas){
|
||||
return request({
|
||||
url: '/manage/costOutput/batchUpdate',
|
||||
method: 'post',
|
||||
data:datas
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询延迟摄影管理列表
|
||||
export function listVideoMonitor(query) {
|
||||
return request({
|
||||
url: '/manage/videoMonitor/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询延迟摄影管理详细
|
||||
export function getVideoMonitor(id) {
|
||||
return request({
|
||||
url: '/manage/videoMonitor/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增延迟摄影管理
|
||||
export function addVideoMonitor(data) {
|
||||
return request({
|
||||
url: '/manage/videoMonitor',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改延迟摄影管理
|
||||
export function updateVideoMonitor(data) {
|
||||
return request({
|
||||
url: '/manage/videoMonitor',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除延迟摄影管理
|
||||
export function delVideoMonitor(id) {
|
||||
return request({
|
||||
url: '/manage/videoMonitor/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function getYsToken(id){
|
||||
return request({
|
||||
url: '/manage/videoMonitor/getYsToken/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4306"><path d="M159.762 160.278h321.02v321.019h-321.02z m383.457 0h321.018v321.019H543.22z m0 382.425h321.018v321.019H543.22z m-383.457 0h321.02v321.019h-321.02z" p-id="4307"></path></svg>
|
After Width: | Height: | Size: 376 B |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5237"><path d="M136.061875 132.541875h197.83v197.83H136.061875zM380.51187501 132.541875h197.83v197.83H380.51187501zM624.951875 132.541875h197.83v197.83H624.951875zM136.061875 380.51187501h197.83v197.83H136.061875zM380.51187501 380.51187501h197.83v197.83H380.51187501zM624.951875 380.51187501h197.83v197.83H624.951875zM136.061875 628.471875h197.83v197.83H136.061875zM380.51187501 628.471875h197.83v197.83H380.51187501zM624.951875 628.471875h197.83v197.83H624.951875z" 1 p-id="5238"></path></svg>
|
After Width: | Height: | Size: 682 B |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3408"><path d="M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560z m176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" p-id="3409"></path></svg>
|
After Width: | Height: | Size: 567 B |
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-button type="primary" plain :icon="OfficeBuilding" @click="showProList">{{userStore.currentProId?userStore.currentProName:'所有项目'}}</el-button>
|
||||
<el-button type="primary" plain :icon="OfficeBuilding" @click="showProList">{{userStore.currentPrjId?userStore.currentProName:'所有项目'}}</el-button>
|
||||
|
||||
<!--选择项目-->
|
||||
<el-dialog v-model="dialogVisible" title="选择切换项目" width="800" modal-class="CurrentProjectDlg">
|
||||
|
@ -16,7 +16,7 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button v-if="userStore.currentProId && isAdmin" type="danger" icon="CircleClose" @click="circleClose">取消选择项目</el-button>
|
||||
<el-button v-if="userStore.currentPrjId && isAdmin" type="danger" icon="CircleClose" @click="circleClose">取消选择项目</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
@ -36,8 +36,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button v-if="scope.row.id == userStore.currentProId" disabled link type="primary">已 选 中</el-button>
|
||||
<el-button v-if="scope.row.id != userStore.currentProId" link type="primary" icon="Switch" @click="changeDefault(scope.row.id)">切换项目</el-button>
|
||||
<el-button v-if="scope.row.id == userStore.currentPrjId" disabled link type="primary">已 选 中</el-button>
|
||||
<el-button v-if="scope.row.id != userStore.currentPrjId" link type="primary" icon="Switch" @click="changeDefault(scope.row.id)">切换项目</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -151,7 +151,7 @@ watch(roleList, newValue => {
|
|||
/** 查询角色列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
queryParams.value.projectId = userStore.currentProId;
|
||||
queryParams.value.projectId = userStore.currentPrjId;
|
||||
listRole(queryParams.value).then(response => {
|
||||
roleList.value = response.rows;
|
||||
total.value = response.total;
|
||||
|
|
|
@ -17,7 +17,7 @@ const useUserStore = defineStore(
|
|||
permissions: [],
|
||||
currentComId: null,
|
||||
currentComName: null,
|
||||
currentProId: null,
|
||||
currentPrjId: null,
|
||||
currentProName: null,
|
||||
}),
|
||||
actions: {
|
||||
|
@ -58,7 +58,7 @@ const useUserStore = defineStore(
|
|||
this.avatar = avatar;
|
||||
this.currentComId = user.activeComId;
|
||||
this.currentComName = user.activeComName;
|
||||
this.currentProId = user.activeProjectId;
|
||||
this.currentPrjId = user.activeProjectId;
|
||||
this.currentProName = user.activeProjectName;
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="proName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="proName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.proName"
|
||||
placeholder="请输入项目名称"
|
||||
|
@ -284,7 +284,7 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 跳转到流程设计页面 */
|
||||
function handleLoadXml(row){
|
||||
if(!userStore.currentProId){
|
||||
if(!userStore.currentPrjId){
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="startProName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="startProName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.startProName"
|
||||
placeholder="请输入项目名称"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="startProName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="startProName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.startProName"
|
||||
placeholder="请输入项目名称"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="startProName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="startProName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.startProName"
|
||||
placeholder="请输入项目名称"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="项目" prop="projectId">
|
||||
<el-select :disabled="data.currentProId != ''" style="width:150px;" v-model="queryParams.projectId" placeholder="请选择项目" clearable
|
||||
<el-select :disabled="data.currentPrjId != ''" style="width:150px;" v-model="queryParams.projectId" placeholder="请选择项目" clearable
|
||||
@change="()=>{handleQuery();projectChange();}">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
|
@ -199,7 +199,7 @@ const data = reactive({
|
|||
},
|
||||
projects:[],
|
||||
subdepts:[],
|
||||
currentProId: '',
|
||||
currentPrjId: '',
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
@ -218,9 +218,9 @@ function projectChange(){
|
|||
function getProjectList() {
|
||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.projects = response.rows;
|
||||
if (userStore.currentProId) {
|
||||
queryParams.value.projectId = userStore.currentProId
|
||||
data.currentProId = userStore.currentProId;
|
||||
if (userStore.currentPrjId) {
|
||||
queryParams.value.projectId = userStore.currentPrjId
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
projectChange();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container attendance-ubi-data-statistics">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="项目" prop="projectId">
|
||||
<el-select :disabled="data.currentProId != ''" style="width:150px;" v-model="queryParams.projectId"
|
||||
<el-select :disabled="data.currentPrjId != ''" style="width:150px;" v-model="queryParams.projectId"
|
||||
placeholder="请选择项目" clearable @change="() => { handleQuery(); projectChange(); }">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
|
@ -88,7 +88,7 @@ const data = reactive({
|
|||
},
|
||||
projects: [],
|
||||
subdepts: [],
|
||||
currentProId: '',
|
||||
currentPrjId: '',
|
||||
attendanceUbiDataList: [],
|
||||
loading: false,
|
||||
total: 0,
|
||||
|
@ -107,9 +107,9 @@ function projectChange() {
|
|||
function getProjectList() {
|
||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.projects = response.rows;
|
||||
if (userStore.currentProId) {
|
||||
queryParams.value.projectId = userStore.currentProId
|
||||
data.currentProId = userStore.currentProId;
|
||||
if (userStore.currentPrjId) {
|
||||
queryParams.value.projectId = userStore.currentPrjId
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
projectChange();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<el-input v-model="queryParams.comId" placeholder="请输入公司主键" clearable @keyup.enter="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目" prop="projectId">
|
||||
<el-select :disabled="data.currentProId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable style="width:150px;"
|
||||
<el-select :disabled="data.currentPrjId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable style="width:150px;"
|
||||
@change="handleQuery">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
|
@ -94,7 +94,7 @@
|
|||
:close-on-press-escape="false">
|
||||
<el-form ref="attendance_cfgRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="所属项目" prop="projectId">
|
||||
<el-select :disabled="data.currentProId != ''||data.mode=='edit'" v-model="form.projectId" placeholder="请选择项目">
|
||||
<el-select :disabled="data.currentPrjId != ''||data.mode=='edit'" v-model="form.projectId" placeholder="请选择项目">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
@ -173,7 +173,7 @@ const data = reactive({
|
|||
projectGuid: [{ required: true, trigger: ['blur', 'change'], message: "请输入项目Guid" }],
|
||||
},
|
||||
projects: [],
|
||||
currentProId: '',
|
||||
currentPrjId: '',
|
||||
mode:'',
|
||||
});
|
||||
|
||||
|
@ -193,9 +193,9 @@ function handleDeviceList(row){
|
|||
function getProjectList() {
|
||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.projects = response.rows;
|
||||
if (userStore.currentProId) {
|
||||
queryParams.value.projectId = userStore.currentProId
|
||||
data.currentProId = userStore.currentProId;
|
||||
if (userStore.currentPrjId) {
|
||||
queryParams.value.projectId = userStore.currentPrjId
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ function reset() {
|
|||
form.value = {
|
||||
id: null,
|
||||
comId: null,
|
||||
projectId: data.currentProId,
|
||||
projectId: data.currentPrjId,
|
||||
vendorsCode: 'uni',
|
||||
AppKey: '',
|
||||
AppSecret: '',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
|
||||
|
||||
<el-form-item label="项目" prop="projectId">
|
||||
<el-select :disabled="data.currentProId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable
|
||||
<el-select :disabled="data.currentPrjId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable
|
||||
@change="handleQuery">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
|
@ -187,7 +187,7 @@ const data = reactive({
|
|||
deviceNo: [{ required: true, trigger: ['blur', 'change'], message: "请输入设备序列号" }],
|
||||
},
|
||||
projects: [],
|
||||
currentProId: '',
|
||||
currentPrjId: '',
|
||||
mode:'',
|
||||
});
|
||||
|
||||
|
@ -208,9 +208,9 @@ function handleAuth(row){
|
|||
function getProjectList() {
|
||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.projects = response.rows;
|
||||
if (userStore.currentProId) {
|
||||
queryParams.value.projectId = userStore.currentProId
|
||||
data.currentProId = userStore.currentProId;
|
||||
if (userStore.currentPrjId) {
|
||||
queryParams.value.projectId = userStore.currentPrjId
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -285,12 +285,12 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (!userStore.currentProId) {
|
||||
if (!userStore.currentPrjId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
form.value.source=ubi_device_source.value[0].value;
|
||||
open.value = true;
|
||||
|
@ -299,7 +299,7 @@ function handleAdd() {
|
|||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
if (!userStore.currentProId) {
|
||||
if (!userStore.currentPrjId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ const data = reactive({
|
|||
deviceNo: [{ required: true, trigger: ['blur', 'change'], message: "请输入设备序列号" }],
|
||||
},
|
||||
projects: [],
|
||||
currentProId: '',
|
||||
currentPrjId: '',
|
||||
mode: '',
|
||||
show: false,
|
||||
row: null
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
@ -266,14 +266,14 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if(!userStore.currentProId){
|
||||
if(!userStore.currentPrjId){
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
form.value.comId = userStore.currentComId;
|
||||
form.value.comName = userStore.currentComName;
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
open.value = true;
|
||||
title.value = "添加业务模板";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
@ -358,12 +358,12 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if(!userStore.currentProId){
|
||||
if(!userStore.currentPrjId){
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
open.value = true;
|
||||
title.value = "添加基础试卷";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
@ -424,7 +424,7 @@ function handleAdd() {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAddCom() {
|
||||
if(!userStore.currentProId){
|
||||
if(!userStore.currentPrjId){
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ function handleAddCom() {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAddProject() {
|
||||
if(!userStore.currentProId){
|
||||
if(!userStore.currentPrjId){
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ function handleAddProject() {
|
|||
initPost();
|
||||
form.value.comId = userStore.currentComId;
|
||||
form.value.comName = userStore.currentComName;
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
open.value = true;
|
||||
title.value = "添加试题及答案";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container bus-training-video-index">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
@ -378,12 +378,12 @@ function handleUpdate(row) {
|
|||
function trainLevelChange(){
|
||||
if(form.value.trainLevel){
|
||||
if(form.value.trainLevel=='3' || form.value.trainLevel=='4'){
|
||||
if(!userStore.currentProId){
|
||||
if(!userStore.currentPrjId){
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
open.value = false;
|
||||
return false;
|
||||
}else{
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
}
|
||||
}else{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
<template>
|
||||
<div class="cost-month" style="border:solid 1px #409eff;margin: 12px 0px;padding: 6px 12px 0px;position: relative;">
|
||||
<el-popover placement="top" :visible="data.showPop2" ref="pop" width="300px">
|
||||
<p>选择年份</p>
|
||||
<div style="margin-bottom: 12px;">
|
||||
<el-date-picker v-model="data.selYear" type="year" placeholder="选择年份" style="width:100%"
|
||||
:picker-options="{ disabledDate: doPick }">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="data.showPop2 = false">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="doAddYear">确定</el-button>
|
||||
</div>
|
||||
<template #reference>
|
||||
<el-button size="mini" type="success" @click="data.showPop2=true" style="margin-right: 12px;" class="btn-add-year" round>增加年份</el-button>
|
||||
</template>
|
||||
</el-popover>
|
||||
<el-tabs type="card" v-model="data.activeName">
|
||||
<el-tab-pane v-for="(it, idx) in data.monthInv" :label="'' + it.year" :name="'' + it.year" :key="idx">
|
||||
<el-row>
|
||||
<el-col v-for="(item, idxx) in it.value" :key="idxx" :span="12">
|
||||
<el-form-item :label="data.names[item.month]" class="w200" :class="item.money * 1 < 0 ? 'txt-error' : ''">
|
||||
<el-input-number :precision="2" v-model="item.money" placeholder="年度投资">
|
||||
</el-input-number>
|
||||
<span class="sp-unit">万元</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {addMonthInvestment} from '@/api/manage/costOutput.js'
|
||||
const { proxy } = getCurrentInstance();
|
||||
const $emit=defineEmits(["success"])
|
||||
const data = reactive({
|
||||
prj: null,
|
||||
selYear: '',
|
||||
names: ['', '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||
activeName: '',
|
||||
monthInv: [],
|
||||
showPop2: false,
|
||||
})
|
||||
function doPick(a, b) {
|
||||
return data.monthInv.filter(d => d.year == a.getFullYear()).length > 0;
|
||||
}
|
||||
function doAddYear() {
|
||||
addMonthInvestment({comId:data.prj.comId,
|
||||
year:proxy.$dt(data.selYear).$y,
|
||||
projectId:data.prj.id,
|
||||
costType:9
|
||||
}).then(d=>{
|
||||
$emit("success");
|
||||
data.showPop2=false;
|
||||
});
|
||||
}
|
||||
function init(d, prj) {
|
||||
data.monthInv = d;
|
||||
data.prj = prj;
|
||||
if (d.filter(it => it.year == new Date().getFullYear()).length > 0) {
|
||||
data.activeName = "" + new Date().getFullYear()
|
||||
} else {
|
||||
if (d.length > 0) {
|
||||
data.activeName = "" + d[0].year;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.cost-month{
|
||||
.btn-add-year{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
z-index: 9;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,185 @@
|
|||
<template>
|
||||
<el-drawer class="cost-output-drawer" v-if="data.isOpen" v-model="data.isOpen" direction="rtl" size="50%" style="padding-left: 20px">
|
||||
<template #header>
|
||||
<div>{{ (data.title) + " 【项目成本产值管理】" }}</div>
|
||||
<right-toolbar @queryTable="doQuery" :search="false">
|
||||
</right-toolbar>
|
||||
</template>
|
||||
<div style="margin-top:12px;" v-if="data.form.totalInv">
|
||||
<el-form ref="form" label-width="100px">
|
||||
<el-tabs type="card" v-model="data.activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="总投资" name="first">
|
||||
<el-form-item label="总投资" class="w400"
|
||||
:class="data.form.totalInv.money * 1 < 0 ? 'txt-error' : ''">
|
||||
<el-input-number :precision="2" v-model="data.form.totalInv.money" placeholder="请输入总投资">
|
||||
</el-input-number>
|
||||
<span class="sp-unit">万元</span>
|
||||
</el-form-item>
|
||||
<div class="div-title fblue" style="color: #409eff;">年度投资</div>
|
||||
<costYear ref="costYearCom" @success="doAddYearSuccess">
|
||||
|
||||
</costYear>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="月度产值" name="fourth">
|
||||
<div class="div-title fblue" style="color: #409eff;">月度产值</div>
|
||||
<costMonth ref="costMonthCom" @success="doAddYearSuccess"></costMonth>
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
|
||||
<div style="text-align: center;margin-top: 24px;">
|
||||
<el-button type="success" :loading="data.loading" @click="doSave">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { listByProjectId,batchUpdate } from '@/api/manage/costOutput.js'
|
||||
import costYear from './costYear.vue';
|
||||
import costMonth from './costMonth.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore()
|
||||
const costYearCom = ref()
|
||||
const costMonthCom = ref()
|
||||
const data = reactive({
|
||||
isOpen: false,
|
||||
prjInfo: null,
|
||||
title: '',
|
||||
loading: false,
|
||||
activeName: 'first',
|
||||
form: {
|
||||
totalInv: null,//总投资
|
||||
contract1: null,//合同金额
|
||||
contract2: null,//合同支付金额
|
||||
contract3: null,//农民工支付金额
|
||||
safety1: null,//安措金额
|
||||
safety2: null,//安措支付金额
|
||||
safety3: null,//安措挂账金额
|
||||
|
||||
},
|
||||
oldData: [],
|
||||
yearInv: [],//年度投资
|
||||
monthInv: [],//月度产值
|
||||
contract: [],//合同金额明细
|
||||
safety: [],//安措支付明细
|
||||
})
|
||||
|
||||
const doQuery = () => {
|
||||
proxy.$confirm('确定刷新数据?', '提示', { type: 'warning' }).then(() => {
|
||||
loadData();
|
||||
});
|
||||
}
|
||||
const showDrawer = (row) => {
|
||||
data.prjInfo = row;
|
||||
data.title = row.projectName;
|
||||
data.isOpen = true;
|
||||
data.activeName="first";
|
||||
loadData();
|
||||
}
|
||||
function handleClick() {
|
||||
|
||||
}
|
||||
function doAddYearSuccess() {
|
||||
loadData();
|
||||
}
|
||||
function doSave() {
|
||||
|
||||
let objs = data.oldData.filter(d => d.costType != 11 && d.costType != 12).map(it => {
|
||||
let obj = { ...it };
|
||||
obj.money = obj.money ? obj.money * 10000 : 0;
|
||||
return obj;
|
||||
});
|
||||
if (objs.filter(d => d.money * 1 < 0).length > 0) {
|
||||
proxy.$message.error("请检查,金额不能为负数!");
|
||||
return;
|
||||
}
|
||||
|
||||
data.loading = true;
|
||||
batchUpdate([...objs]).then(d => {
|
||||
data.loading = false;
|
||||
if (d.code != 200) {
|
||||
loadData();
|
||||
} else {
|
||||
proxy.$modal.msgSuccess("保存成功");
|
||||
loadData();
|
||||
}
|
||||
});
|
||||
}
|
||||
function getValue(tmps, type) {
|
||||
let objs = tmps.filter(d => d.costType == type);
|
||||
if (objs.length > 0) {
|
||||
return objs[0];
|
||||
}
|
||||
let obj = {
|
||||
money: 0,
|
||||
costType: type,
|
||||
projectId: data.prjInfo.id
|
||||
};
|
||||
tmps.push(obj);
|
||||
return obj;
|
||||
}
|
||||
function loadData() {
|
||||
listByProjectId({
|
||||
projectId: data.prjInfo.id,
|
||||
comId: data.prjInfo.comId
|
||||
}).then(d => {
|
||||
let tmps = (d.data || []).map(it => {
|
||||
it.money = it.money ? it.money / 10000.0 : 0;
|
||||
it.money2 = it.money2 ? it.money2 / 10000.0 : 0;
|
||||
it.moneyTotal = it.money - it.money2;
|
||||
it.money3 = it.money3 ? it.money3 / 10000.0 : 0;
|
||||
it.isErr = false;
|
||||
it.date1 = proxy.$dt(it.date1)
|
||||
return it;
|
||||
});
|
||||
data.oldData = tmps;
|
||||
data.form.totalInv = getValue(tmps, 1);
|
||||
data.yearInv = tmps.filter(it => it.costType == 2);
|
||||
data.contract = tmps.filter(it => it.costType == 11);
|
||||
data.safety = tmps.filter(it => it.costType == 12);
|
||||
|
||||
data.form.contract1 = getValue(tmps, 3);
|
||||
data.form.contract2 = getValue(tmps, 10);
|
||||
|
||||
data.form.safety1 = getValue(tmps, 6);
|
||||
data.form.safety2 = getValue(tmps, 7);
|
||||
data.form.safety3 = getValue(tmps, 8);
|
||||
let objs = tmps.filter(it => it.costType == 9);
|
||||
let obj = {};
|
||||
data.monthInv = [];
|
||||
objs.forEach(it => {
|
||||
if (!obj[it.year]) {
|
||||
obj[it.year] = [];
|
||||
}
|
||||
obj[it.year].push(it);
|
||||
});
|
||||
for (let k in obj) {
|
||||
data.monthInv.push({
|
||||
year: k,
|
||||
value: obj[k]
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
costYearCom.value.init(data.yearInv, data.prjInfo);
|
||||
costMonthCom.value.init(data.monthInv, data.prjInfo);
|
||||
}, 400)
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showDrawer
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.cost-output-drawer{
|
||||
.el-drawer__header{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,86 @@
|
|||
<template>
|
||||
<div class="cost-year" style="border:solid 1px #409eff;margin: 12px 0px;padding: 12px 12px 0px;position: relative;">
|
||||
|
||||
<el-popover placement="top" :visible="data.showPop2" width="300px">
|
||||
<p>选择年份</p>
|
||||
<div style="margin-bottom: 12px;">
|
||||
<el-date-picker v-model="data.selYear" type="year" placeholder="选择年份" style="width:100%"
|
||||
:picker-options="{ disabledDate: doPick }">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="doCancel">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="doAddYear">确定</el-button>
|
||||
</div>
|
||||
<template #reference>
|
||||
<el-button class="btn-add-year" size="mini" @click="data.showPop2=true" type="success" style="margin-right: 12px;" round>增加年份</el-button>
|
||||
</template>
|
||||
|
||||
</el-popover>
|
||||
|
||||
|
||||
<el-tabs type="card" v-model="data.activeName">
|
||||
<el-tab-pane v-for="(it, idx) in data.yearInv" :label="'' + it.year" :name="'' + it.year" :key="idx">
|
||||
<el-form-item label="年度投资" class="w400" :class="it.money * 1 < 0 ? 'txt-error' : ''">
|
||||
<el-input-number :precision="2" v-model="it.money" placeholder="年度投资">
|
||||
</el-input-number>
|
||||
<span class="sp-unit">万元</span>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {addYearInvestment} from '@/api/manage/costOutput.js'
|
||||
const { proxy } = getCurrentInstance();
|
||||
const $emit=defineEmits(["success"])
|
||||
const data = reactive({
|
||||
selYear: '',
|
||||
activeName: '',
|
||||
yearInv: [],
|
||||
showPop2: false,
|
||||
prj: null
|
||||
})
|
||||
|
||||
function doCancel(){
|
||||
data.showPop2=false;
|
||||
}
|
||||
function doPick(a, b) {
|
||||
return data.yearInv.filter(d => d.year == a.getFullYear()).length > 0;
|
||||
}
|
||||
function doAddYear() {
|
||||
addYearInvestment({
|
||||
comId:data.prj.comId,
|
||||
year:proxy.$dt(data.selYear).$y,
|
||||
projectId:data.prj.id,
|
||||
costType:2
|
||||
}).then(d=>{
|
||||
$emit("success");
|
||||
data.showPop2=false;
|
||||
})
|
||||
}
|
||||
function init(d, prj) {
|
||||
data.prj = prj;
|
||||
data.yearInv = d;
|
||||
if (d.filter(it => it.year == new Date().getFullYear()).length > 0) {
|
||||
data.activeName = "" + new Date().getFullYear()
|
||||
} else {
|
||||
if (d.length > 0) {
|
||||
data.activeName = "" + d[0].year;
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.cost-year{
|
||||
.btn-add-year{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
z-index: 9;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -2,76 +2,35 @@
|
|||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="部门ID" prop="comId">
|
||||
<el-input
|
||||
v-model="queryParams.comId"
|
||||
placeholder="请输入部门ID"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.comId" placeholder="请输入部门ID" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编号" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入项目编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="money">
|
||||
<el-input
|
||||
v-model="queryParams.money"
|
||||
placeholder="请输入金额"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.money" placeholder="请输入金额" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额2" prop="money2">
|
||||
<el-input
|
||||
v-model="queryParams.money2"
|
||||
placeholder="请输入金额2"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.money2" placeholder="请输入金额2" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" prop="month">
|
||||
<el-input
|
||||
v-model="queryParams.month"
|
||||
placeholder="请输入月份"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.month" placeholder="请输入月份" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="年份" prop="year">
|
||||
<el-input
|
||||
v-model="queryParams.year"
|
||||
placeholder="请输入年份"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.year" placeholder="请输入年份" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="date1">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.date1"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
<el-date-picker clearable v-model="queryParams.date1" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="date2">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.date2"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
<el-date-picker clearable v-model="queryParams.date2" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入${comment}"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.isDel" placeholder="请输入${comment}" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
|
@ -81,42 +40,20 @@
|
|||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['manage:costOutput:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['manage:costOutput:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['manage:costOutput:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['manage:costOutput:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['manage:costOutput:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['manage:costOutput:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['manage:costOutput:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['manage:costOutput:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -145,19 +82,16 @@
|
|||
<el-table-column label="${comment}" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:costOutput:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:costOutput:remove']">删除</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:costOutput:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['manage:costOutput:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改项目成本产值对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
|
@ -181,18 +115,12 @@
|
|||
<el-input v-model="form.year" placeholder="请输入年份" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="date1">
|
||||
<el-date-picker clearable
|
||||
v-model="form.date1"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
<el-date-picker clearable v-model="form.date1" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="date2">
|
||||
<el-date-picker clearable
|
||||
v-model="form.date2"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
<el-date-picker clearable v-model="form.date2" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
@ -350,12 +278,12 @@ function submitForm() {
|
|||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除项目成本产值编号为"' + _ids + '"的数据项?').then(function() {
|
||||
proxy.$modal.confirm('是否确认删除项目成本产值编号为"' + _ids + '"的数据项?').then(function () {
|
||||
return delCostOutput(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container green-carbon-data">
|
||||
<template v-if="data.currentProId">
|
||||
<template v-if="data.currentPrjId">
|
||||
<el-tabs v-model="data.selTab" type="card" class="main-tab" @click="doTabClick">
|
||||
<el-tab-pane v-for="(it, idx) in data.types" :key="idx" :name="it.value"
|
||||
:label="it.text + '(' + it.count + ')'"></el-tab-pane>
|
||||
|
@ -167,7 +167,7 @@ const data = reactive({
|
|||
{ required: true, message: '请输入实际使用量', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
currentProId: '',
|
||||
currentPrjId: '',
|
||||
types: greenCarbonData.types.map(it => {
|
||||
it.count = 0;
|
||||
return it;
|
||||
|
@ -278,7 +278,7 @@ function calcDataValue() {
|
|||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (!userStore.currentProId) {
|
||||
if (!userStore.currentPrjId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
|
@ -286,13 +286,13 @@ function handleAdd() {
|
|||
listGreenCarbonItem({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
projectId: userStore.currentProId,
|
||||
comIdL: userStore.currentComId,
|
||||
projectId: userStore.currentPrjId,
|
||||
comId: userStore.currentComId,
|
||||
carbonFactorType: data.selTab
|
||||
}).then(d => {
|
||||
data.itemList = d.rows || [];
|
||||
});
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
open.value = true;
|
||||
title.value = "建碳管理 - " + getGreenCarbon(data.selTab).text + ' - 新增';
|
||||
|
@ -305,8 +305,8 @@ function handleUpdate(row) {
|
|||
listGreenCarbonItem({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
projectId: userStore.currentProId,
|
||||
comIdL: userStore.currentComId,
|
||||
projectId: userStore.currentPrjId,
|
||||
comId: userStore.currentComId,
|
||||
carbonFactorType: data.selTab
|
||||
}).then(d => {
|
||||
data.itemList = d.rows || [];
|
||||
|
@ -361,9 +361,9 @@ function handleExport() {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
queryParams.value.projectId = userStore.currentProId;
|
||||
queryParams.value.projectId = userStore.currentPrjId;
|
||||
queryParams.value.comId = userStore.currentComId;
|
||||
data.currentProId = userStore.currentProId;
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
getList();
|
||||
getCounts();
|
||||
})
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
|
||||
|
||||
<el-form-item label="项目" prop="projectId">
|
||||
<el-select :disabled="data.currentProId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable style="width:150px;"
|
||||
<el-select :disabled="data.currentPrjId != ''" v-model="queryParams.projectId" placeholder="请选择项目" clearable style="width:150px;"
|
||||
@change="handleQuery">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
|
@ -52,8 +52,8 @@
|
|||
|
||||
<el-table v-loading="loading" :data="greenCarbonItemList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="公司" align="center" prop="compName" v-if="!data.currentProId"/>
|
||||
<el-table-column label="分包单位" align="center" prop="projectName" v-if="!data.currentProId"/>
|
||||
<el-table-column label="公司" align="center" prop="compName" v-if="!data.currentPrjId"/>
|
||||
<el-table-column label="分包单位" align="center" prop="projectName" v-if="!data.currentPrjId"/>
|
||||
<el-table-column label="碳因子类型" align="center" prop="carbonFactorType">
|
||||
<template #default="scope">{{getGreenCarbon(scope.row.carbonFactorType).text }}</template>
|
||||
</el-table-column>
|
||||
|
@ -114,8 +114,8 @@
|
|||
|
||||
<el-dialog title="导入结果" v-model="data.openImport" width="800px" append-to-body class="green-import-result-dialog">
|
||||
<el-table :data="data.importData" height="50vh">
|
||||
<el-table-column label="公司" align="center" prop="compName" v-if="!data.currentProId"/>
|
||||
<el-table-column label="分包单位" align="center" prop="projectName" v-if="!data.currentProId"/>
|
||||
<el-table-column label="公司" align="center" prop="compName" v-if="!data.currentPrjId"/>
|
||||
<el-table-column label="分包单位" align="center" prop="projectName" v-if="!data.currentPrjId"/>
|
||||
<el-table-column label="碳因子类型" align="center" prop="carbonFactorType">
|
||||
<template #default="scope">{{getGreenCarbon(scope.row.carbonFactorType).text }}</template>
|
||||
</el-table-column>
|
||||
|
@ -201,7 +201,7 @@ const data = reactive({
|
|||
],
|
||||
},
|
||||
projects:[],
|
||||
currentProId:'',
|
||||
currentPrjId:'',
|
||||
types:greenCarbonData.types,
|
||||
delDatas:[],
|
||||
importData:[],
|
||||
|
@ -213,9 +213,9 @@ const { queryParams, form, rules } = toRefs(data);
|
|||
function getProjectList() {
|
||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.projects = response.rows;
|
||||
if (userStore.currentProId) {
|
||||
queryParams.value.projectId = userStore.currentProId
|
||||
data.currentProId = userStore.currentProId;
|
||||
if (userStore.currentPrjId) {
|
||||
queryParams.value.projectId = userStore.currentPrjId
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -278,12 +278,12 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (!userStore.currentProId) {
|
||||
if (!userStore.currentPrjId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
open.value = true;
|
||||
title.value = "碳因子管理-增加";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container project-milestone">
|
||||
|
||||
<template v-if="data.currentProId">
|
||||
<template v-if="data.currentPrjId">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
|
@ -99,7 +99,7 @@ const data = reactive({
|
|||
},
|
||||
rules: {
|
||||
},
|
||||
currentProId: '',
|
||||
currentPrjId: '',
|
||||
milestoneList: []
|
||||
});
|
||||
|
||||
|
@ -135,7 +135,7 @@ function handleUpdate(row) {
|
|||
let objs = data.milestoneList.filter(d => d.nodeName).filter(d => d.nodeName.trim());
|
||||
objs.forEach(it => {
|
||||
it.comId = userStore.currentComId;
|
||||
it.projectId = userStore.currentProId;
|
||||
it.projectId = userStore.currentPrjId;
|
||||
})
|
||||
if (objs.length == 0) {
|
||||
proxy.$modal.msgError("请输入节点名称!");
|
||||
|
@ -171,9 +171,9 @@ function handleDelete(row) {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
queryParams.value.projectId = userStore.currentProId;
|
||||
queryParams.value.projectId = userStore.currentPrjId;
|
||||
queryParams.value.comId = userStore.currentComId;
|
||||
data.currentProId = userStore.currentProId;
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -306,7 +306,7 @@ function handleExport() {
|
|||
...queryParams.value
|
||||
}, `${name}计划_${new Date().getTime()}.mpp`)
|
||||
}
|
||||
data.projectId=userStore.currentProId;
|
||||
data.projectId=userStore.currentPrjId;
|
||||
data.compId=userStore.currentComId;
|
||||
queryParams.value.projectId=data.projectId;
|
||||
getList();
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="项目排序" align="center" prop="projectSort" width="180" v-if="isAdmin">
|
||||
<template #default="scope">
|
||||
<el-input-number v-model="scope.row.projectSort" :min="1" :max="999"
|
||||
<el-input-number v-model="scope.row.projectSort" :min="1" :max="999"
|
||||
@change="setProjectSort(scope.row, $event)"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -101,11 +101,42 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="150" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<template #default="scope"><!--
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:proProjectInfo:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['manage:proProjectInfo:remove']">删除</el-button>
|
||||
v-hasPermi="['manage:proProjectInfo:remove']">删除</el-button>-->
|
||||
<el-dropdown @command="e=>menuCommand(e,scope.row)">
|
||||
<span class="el-dropdown-link">
|
||||
<el-icon :size="14" color="var(--el-color-primary)">
|
||||
<Setting />
|
||||
</el-icon><span style="margin-left:8px;position: relative;top:-3px;">操作</span>
|
||||
<el-icon class="el-icon--right">
|
||||
<arrow-down />
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-hasPermi="['manage:proProjectInfo:edit']" command="edit"
|
||||
style="color: var(--el-color-primary);"><el-icon :size="14" color="var(--el-color-primary)">
|
||||
<Edit />
|
||||
</el-icon>修改
|
||||
</el-dropdown-item>
|
||||
|
||||
|
||||
<el-dropdown-item divided v-hasPermi="['manage:costOutput:add']" command="outCost"
|
||||
style="color: var(--el-color-primary);"><el-icon :size="14" color="var(--el-color-primary)">
|
||||
<Money />
|
||||
</el-icon>项目产值管理
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item divided v-hasPermi="['manage:proProjectInfo:remove']" command="delete"
|
||||
style="color: var(--el-color-primary);"><el-icon :size="14" color="var(--el-color-primary)">
|
||||
<Delete />
|
||||
</el-icon>删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -114,13 +145,10 @@
|
|||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改项目信息对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="1080px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false" class="project-info-edit-dlg">
|
||||
<el-dialog :title="title" v-model="open" width="1080px" append-to-body :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" class="project-info-edit-dlg">
|
||||
<el-form ref="proProjectInfoRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-tabs
|
||||
v-model="activeTags"
|
||||
type="card"
|
||||
class="demo-tabs"
|
||||
>
|
||||
<el-tabs v-model="activeTags" type="card" class="demo-tabs">
|
||||
<el-tab-pane label="项目基本信息" name="base">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
|
@ -167,11 +195,11 @@
|
|||
<el-input v-model="form.techLeader" maxlength="10" show-word-limit placeholder="请输入项目技术负责人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-form-item label="技术负责人电话" prop="techLeaderPhone">
|
||||
<el-input v-model="form.techLeaderPhone" maxlength="10" show-word-limit placeholder="请输入技术负责人电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
|
@ -218,13 +246,13 @@
|
|||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-form-item label="计划开工时间" prop="scheduledStartTime">
|
||||
<el-date-picker v-model="form.scheduledStartTime" type="date" placeholder="请选择计划开工时间"
|
||||
style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-form-item label="计划完工时间" prop="plannedCompletionTime">
|
||||
<el-date-picker v-model="form.plannedCompletionTime" type="date" placeholder="请选择计划完工时间"
|
||||
style="width:100%" />
|
||||
|
@ -239,15 +267,15 @@
|
|||
:value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-form-item label="实际开工时间" prop="actualOperatingTime">
|
||||
<el-date-picker v-model="form.actualOperatingTime" type="date" placeholder="请选择实际开工时间"
|
||||
style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-col :span="8" class="fitem-no-width">
|
||||
<el-form-item label="实际完工时间" prop="actualCompletionTime">
|
||||
<el-date-picker v-model="form.actualCompletionTime" type="date" placeholder="请选择实际完工时间"
|
||||
style="width:100%" />
|
||||
|
@ -265,44 +293,47 @@
|
|||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注"
|
||||
maxlength="255" />
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" maxlength="255" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="建设单位信息" name="depts" v-if="data.opt=='edit'">
|
||||
<el-tab-pane label="建设单位信息" name="depts" v-if="data.opt == 'edit'">
|
||||
<div class="scroll" style="max-height: 60vh; overflow-y: auto;">
|
||||
<div v-for="(it,idx) in data.projectDeptsList" :key="idx" class="prj-dept-item">
|
||||
<div class="dept-item-header">
|
||||
<el-icon size="14" color="#2196F3"><OfficeBuilding /></el-icon>
|
||||
<span class="sp-header">{{ it.header }}</span>
|
||||
<el-button @click="doAddPrjDept(it)" type="primary" size="small" style="margin-left: 10px;" v-if="it.header!='建设单位'">增加一行</el-button>
|
||||
<div v-for="(it, idx) in data.projectDeptsList" :key="idx" class="prj-dept-item">
|
||||
<div class="dept-item-header">
|
||||
<el-icon size="14" color="#2196F3">
|
||||
<OfficeBuilding />
|
||||
</el-icon>
|
||||
<span class="sp-header">{{ it.header }}</span>
|
||||
<el-button @click="doAddPrjDept(it)" type="primary" size="small" style="margin-left: 10px;"
|
||||
v-if="it.header != '建设单位'">增加一行</el-button>
|
||||
</div>
|
||||
<el-row v-for="(item, index) in it.datas" :key="index">
|
||||
<el-col :span="7">
|
||||
<el-form-item :label="item.deptType + '名称'">
|
||||
<el-input v-model="item.deptName" class="txt-dept-name" placeholder="请输入单位名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="负责人姓名">
|
||||
<el-input v-model="item.leader" class="txt-leader" placeholder="请输入负责人姓名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="负责人电话">
|
||||
<el-input v-model="item.phone" class="txt-phone" placeholder="请输入负责人电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button v-if="index > 0" type="warning" size="small"
|
||||
@click="doDeletPrjDept(it, item, index)">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row v-for="(item,index) in it.datas" :key="index">
|
||||
<el-col :span="7">
|
||||
<el-form-item :label="item.deptType+'名称'">
|
||||
<el-input v-model="item.deptName" class="txt-dept-name" placeholder="请输入单位名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="负责人姓名">
|
||||
<el-input v-model="item.leader" class="txt-leader" placeholder="请输入负责人姓名"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="负责人电话">
|
||||
<el-input v-model="item.phone" class="txt-phone" placeholder="请输入负责人电话"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-button v-if="index>0" type="warning" size="small" @click="doDeletPrjDept(it,item,index)">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目大屏设置" name="setting" v-if="data.opt=='edit'" class="pan-setting">
|
||||
<el-tab-pane label="项目大屏设置" name="setting" v-if="data.opt == 'edit'" class="pan-setting">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目显示名" prop="orgName">
|
||||
|
@ -311,32 +342,34 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :class="form.setting.orgLogo?'no-up':'can-up'" class="up-img">
|
||||
<el-col :span="12" :class="form.setting.orgLogo ? 'no-up' : 'can-up'" class="up-img">
|
||||
<el-form-item label="显示LOGO" prop="orgLogo">
|
||||
<image-upload v-model="form.setting.orgLogo" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :class="form.setting.orgPlane?'no-up':'can-up'" class="up-img">
|
||||
<el-col :span="12" :class="form.setting.orgPlane ? 'no-up' : 'can-up'" class="up-img">
|
||||
<el-form-item label="施工平面图布置图" prop="orgPlane">
|
||||
<image-upload v-model="form.setting.orgPlane" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :class="form.setting.orgImage && form.setting.orgImage.split(',').length==9?'no-up':'can-up'" class="up-img">
|
||||
<el-col :span="24"
|
||||
:class="form.setting.orgImage && form.setting.orgImage.split(',').length == 9 ? 'no-up' : 'can-up'"
|
||||
class="up-img">
|
||||
<el-form-item label="项目预览图" prop="orgImage">
|
||||
<image-upload v-model="form.setting.orgImage" :limit="9" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :class="form.setting.orgVideo?'no-up':'can-up'" class="up-video">
|
||||
<el-col :span="24" :class="form.setting.orgVideo ? 'no-up' : 'can-up'" class="up-video">
|
||||
<el-form-item label="项目视频" prop="orgVideo">
|
||||
<file-upload v-model="form.setting.orgVideo" :limit="1" :fileType="['mp4']" :fileSize="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
|
@ -347,7 +380,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<costOutputDrawer ref="coDrawer"/>
|
||||
<baidu-map ref="mapRef" @docom="mapDocom"></baidu-map>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -357,6 +390,7 @@ import { deptTreeSelect } from "@/api/system/user";
|
|||
import { listProProjectInfo, getProProjectInfo, delProProjectInfo, addProProjectInfo, updateProProjectInfo } from "@/api/manage/proProjectInfo";
|
||||
import BaiduMap from "@/components/BaiduMap/Map.vue";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import costOutputDrawer from "../costOutput/costOutputDrawer.vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { pro_project_type, pro_project_schedule, pro_dept_type, sys_is_del } = proxy.useDict('pro_project_type', 'pro_project_schedule', 'pro_dept_type', 'sys_is_del');
|
||||
|
||||
|
@ -373,10 +407,10 @@ const total = ref(0);
|
|||
const title = ref("");
|
||||
const activeTags = ref('base')
|
||||
const addressInfos = ref("");
|
||||
const fitemPrjAddr=ref()
|
||||
const fitemPrjAddr = ref()
|
||||
const projectDeptsList = ref([]);
|
||||
const checkedProjectDepts = ref([]);
|
||||
|
||||
const coDrawer=ref();
|
||||
const deptOptions = ref([]);
|
||||
const userStore = useUserStore()
|
||||
const data = reactive({
|
||||
|
@ -399,7 +433,7 @@ const data = reactive({
|
|||
projectStatus: null,
|
||||
isDel: null,
|
||||
},
|
||||
rules: {
|
||||
rules: {
|
||||
disDeptId: [{ required: true, message: "归属单位不能为空", trigger: "change" }],
|
||||
projectName: [{ required: true, message: "项目名称不能为空", trigger: "blur" }],
|
||||
simpleName: [{ required: false, message: "项目简称不能为空", trigger: "blur" }],
|
||||
|
@ -418,25 +452,39 @@ const data = reactive({
|
|||
actualOperatingTime: [{ required: true, message: "实际开工时间不能为空", trigger: "blur" }],
|
||||
projectSummarize: [{ required: true, message: "项目概述不能为空", trigger: "blur" }],
|
||||
},
|
||||
opt:'',
|
||||
projectDeptsList:[]
|
||||
opt: '',
|
||||
projectDeptsList: []
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 地图选择 */
|
||||
function mapDocom(pt, city) {
|
||||
form.value.province=city.province
|
||||
form.value.city=city.city
|
||||
form.value.district=city.district
|
||||
form.value.address=city.address;
|
||||
form.value.province = city.province
|
||||
form.value.city = city.city
|
||||
form.value.district = city.district
|
||||
form.value.address = city.address;
|
||||
form.value.projectAddress = city.address || "";
|
||||
form.value.longitude = pt.lng.toFixed(5);
|
||||
form.value.latitude = pt.lat.toFixed(5);
|
||||
addressInfos.value = form.value.projectAddress + "," + form.value.longitude + "," + form.value.latitude;
|
||||
fitemPrjAddr.value.clearValidate();
|
||||
fitemPrjAddr.value.clearValidate();
|
||||
}
|
||||
|
||||
function menuCommand(e,row){
|
||||
if(e=="edit"){
|
||||
handleUpdate(row);
|
||||
return;
|
||||
}
|
||||
if(e=="delete"){
|
||||
handleDelete(row);
|
||||
return;
|
||||
}
|
||||
if(e=="outCost"){
|
||||
coDrawer.value.showDrawer(row);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/** 查询项目信息列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
|
@ -455,7 +503,7 @@ function cancel() {
|
|||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
addressInfos.value="";
|
||||
addressInfos.value = "";
|
||||
form.value = {
|
||||
id: null,
|
||||
deptId: null,
|
||||
|
@ -499,7 +547,7 @@ function reset() {
|
|||
setting: {}
|
||||
};
|
||||
proxy.resetForm("proProjectInfoRef");
|
||||
activeTags.value="base";
|
||||
activeTags.value = "base";
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -523,65 +571,64 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
data.opt="add"
|
||||
data.opt = "add"
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加项目";
|
||||
}
|
||||
function doAddPrjDept(it){
|
||||
function doAddPrjDept(it) {
|
||||
it.datas.push({
|
||||
deptType:it.header,deptName:'',leader:'',phone:''
|
||||
deptType: it.header, deptName: '', leader: '', phone: ''
|
||||
});
|
||||
}
|
||||
|
||||
function doDeletPrjDept(it,item,index){
|
||||
if(item.deptName || item.leader || item.phone){
|
||||
function doDeletPrjDept(it, item, index) {
|
||||
if (item.deptName || item.leader || item.phone) {
|
||||
proxy.$modal.confirm('是否确认删除这个数据?').then(function () {
|
||||
it.datas.splice(index,1)
|
||||
it.datas.splice(index, 1)
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
}else{
|
||||
it.datas.splice(index,1)
|
||||
} else {
|
||||
it.datas.splice(index, 1)
|
||||
}
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
data.opt="edit"
|
||||
data.opt = "edit"
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getProProjectInfo(_id).then(response => {
|
||||
debugger
|
||||
getProProjectInfo(_id).then(response => {
|
||||
form.value = response.data;
|
||||
form.value.setting=response.data.setting||{
|
||||
orgName:'',
|
||||
orgLogo:'',
|
||||
orgPlane:'',
|
||||
orgImage:[],
|
||||
orgVideo:''
|
||||
form.value.setting = response.data.setting || {
|
||||
orgName: '',
|
||||
orgLogo: '',
|
||||
orgPlane: '',
|
||||
orgImage: [],
|
||||
orgVideo: ''
|
||||
};
|
||||
open.value = true;
|
||||
title.value = "修改项目信息";
|
||||
projectDeptsList.value=(response.data.projectDeptsList||[]).filter(d=>d.id);
|
||||
if(projectDeptsList.value.length==0){
|
||||
projectDeptsList.value=[
|
||||
{deptType:'建设单位',deptName:'',leader:'',phone:''},
|
||||
{deptType:'监理单位',deptName:'',leader:'',phone:''},
|
||||
{deptType:'设计单位',deptName:'',leader:'',phone:''},
|
||||
{deptType:'检测单位',deptName:'',leader:'',phone:''},
|
||||
{deptType:'勘察单位',deptName:'',leader:'',phone:''},
|
||||
projectDeptsList.value = (response.data.projectDeptsList || []).filter(d => d.id);
|
||||
if (projectDeptsList.value.length == 0) {
|
||||
projectDeptsList.value = [
|
||||
{ deptType: '建设单位', deptName: '', leader: '', phone: '' },
|
||||
{ deptType: '监理单位', deptName: '', leader: '', phone: '' },
|
||||
{ deptType: '设计单位', deptName: '', leader: '', phone: '' },
|
||||
{ deptType: '检测单位', deptName: '', leader: '', phone: '' },
|
||||
{ deptType: '勘察单位', deptName: '', leader: '', phone: '' },
|
||||
];
|
||||
}
|
||||
let headers="建设单位,监理单位,设计单位,检测单位,勘察单位".split(",");
|
||||
data.projectDeptsList=[];
|
||||
headers.forEach(h=>{
|
||||
let headers = "建设单位,监理单位,设计单位,检测单位,勘察单位".split(",");
|
||||
data.projectDeptsList = [];
|
||||
headers.forEach(h => {
|
||||
data.projectDeptsList.push({
|
||||
header:h,
|
||||
datas:projectDeptsList.value.filter(it=>it.deptType==h)
|
||||
header: h,
|
||||
datas: projectDeptsList.value.filter(it => it.deptType == h)
|
||||
})
|
||||
});
|
||||
});
|
||||
addressInfos.value = form.value.projectAddress + "," + form.value.longitude + "," + form.value.latitude;
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -618,12 +665,12 @@ function handleDeptsSelectionChange(selection) {
|
|||
checkedProjectDepts.value = selection.map(item => item.index)
|
||||
}
|
||||
|
||||
function getProjectDeptsList(){
|
||||
let datas=[];
|
||||
data.projectDeptsList.forEach(d=>{
|
||||
if(d.datas){
|
||||
d.datas.forEach(it=>{
|
||||
if(it.deptName || it.leader || it.phone){
|
||||
function getProjectDeptsList() {
|
||||
let datas = [];
|
||||
data.projectDeptsList.forEach(d => {
|
||||
if (d.datas) {
|
||||
d.datas.forEach(it => {
|
||||
if (it.deptName || it.leader || it.phone) {
|
||||
datas.push(it);
|
||||
}
|
||||
})
|
||||
|
@ -637,9 +684,9 @@ function submitForm() {
|
|||
proxy.$refs["proProjectInfoRef"].validate(valid => {
|
||||
if (valid) {
|
||||
form.value.projectDeptsList = getProjectDeptsList();
|
||||
let postData={
|
||||
let postData = {
|
||||
...form.value
|
||||
}
|
||||
}
|
||||
if (form.value.id != null) {
|
||||
updateProProjectInfo(postData).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
|
@ -702,9 +749,9 @@ function getMapInfo() {
|
|||
/** 初始化页面 */
|
||||
function initPage() {
|
||||
let roles = userStore.roles;
|
||||
if(roles.includes("admin") || roles.includes("gsAdmin")){
|
||||
if (roles.includes("admin") || roles.includes("gsAdmin")) {
|
||||
isAdmin.value = true;
|
||||
}else{
|
||||
} else {
|
||||
isAdmin.value = false;
|
||||
}
|
||||
}
|
||||
|
@ -714,52 +761,62 @@ getList();
|
|||
getDeptTree();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.project-info-edit-dlg{
|
||||
.prj-dept-item{
|
||||
.project-info-edit-dlg {
|
||||
.prj-dept-item {
|
||||
margin-bottom: 10px;
|
||||
.dept-item-header{
|
||||
|
||||
.dept-item-header {
|
||||
display: flex;
|
||||
color: #2196F3;
|
||||
align-items: center;
|
||||
line-height: 30px;
|
||||
.sp-header{
|
||||
|
||||
.sp-header {
|
||||
display: inline-block;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
.el-form-item{
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
.el-input{
|
||||
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
width:auto;
|
||||
width: auto;
|
||||
}
|
||||
.sp-label{
|
||||
font-size:12px;
|
||||
color:#888;
|
||||
&::after{
|
||||
|
||||
.sp-label {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
|
||||
&::after {
|
||||
content: ":";
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-tab-pane.pan-setting{
|
||||
.el-form-item{
|
||||
|
||||
.el-tab-pane.pan-setting {
|
||||
.el-form-item {
|
||||
flex-flow: column;
|
||||
margin-bottom:0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.up-img{
|
||||
&.no-up{
|
||||
.el-upload__tip{
|
||||
|
||||
.up-img {
|
||||
&.no-up {
|
||||
.el-upload__tip {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.up-video{
|
||||
&.no-up{
|
||||
.el-upload__tip{
|
||||
|
||||
.up-video {
|
||||
&.no-up {
|
||||
.el-upload__tip {
|
||||
display: none;
|
||||
}
|
||||
.upload-file-uploader{
|
||||
|
||||
.upload-file-uploader {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位类型" prop="subDeptType">
|
||||
|
@ -331,12 +331,12 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (!userStore.currentProId) {
|
||||
if (!userStore.currentPrjId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
activeTabs.value = "base";
|
||||
open.value = true;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="subDeptName">
|
||||
|
@ -273,14 +273,14 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (!userStore.currentProId) {
|
||||
if (!userStore.currentPrjId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
initSubDeptOptions(userStore.currentProId);
|
||||
initSubDeptOptions(userStore.currentPrjId);
|
||||
activeTabs.value = "base";
|
||||
open.value = true;
|
||||
title.value = "添加单位班组";
|
||||
|
|
|
@ -552,7 +552,7 @@ function handleSelectionChange(selection) {
|
|||
}
|
||||
|
||||
function loadSubDepts(cb) {
|
||||
listProProjectInfoSubdepts({ projectId: userStore.currentProId, pageNum: 1, pageSize: 100 }).then(d => {
|
||||
listProProjectInfoSubdepts({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 100 }).then(d => {
|
||||
data.subdepts = d.rows || [];
|
||||
if (data.subdepts.length > 0) {
|
||||
let sd = data.subdepts[0];
|
||||
|
@ -565,7 +565,7 @@ function loadSubDepts(cb) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (!userStore.currentProId) {
|
||||
if (!userStore.currentPrjId) {
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ function handleAdd() {
|
|||
data.editData=null;
|
||||
data.mode = 'add';
|
||||
form.value.certificateType = "";
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectId = userStore.currentPrjId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
form.value.nation = data.nationOpts[0];
|
||||
form.value.sex = data.sexOpts[0];
|
||||
|
|
|
@ -0,0 +1,320 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-if="false" :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="${comment}" prop="comId">
|
||||
<el-input v-model="queryParams.comId" placeholder="请输入${comment}" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入${comment}" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控名称" prop="monitorName">
|
||||
<el-input v-model="queryParams.monitorName" placeholder="请输入监控名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="AppKey" prop="appkey">
|
||||
<el-input v-model="queryParams.appkey" placeholder="请输入AppKey" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Secret" prop="secret">
|
||||
<el-input v-model="queryParams.secret" placeholder="请输入Secret" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" prop="manufacturer">
|
||||
<el-input v-model="queryParams.manufacturer" placeholder="请输入设备厂商" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否关键点" prop="keyPoint">
|
||||
<el-input v-model="queryParams.keyPoint" placeholder="请输入是否关键点" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="state">
|
||||
<el-input v-model="queryParams.state" placeholder="请输入${comment}" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="queryParams.isDel" placeholder="请输入${comment}" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="upadteTime">
|
||||
<el-date-picker clearable v-model="queryParams.upadteTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['manage:videoMonitor:add']">新增</el-button>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['manage:videoMonitor:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['manage:videoMonitor:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['manage:videoMonitor:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
-->
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="videoMonitorList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="监控名称" align="center" prop="monitorName" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="链接" align="center" prop="url" />
|
||||
<el-table-column label="萤石云AppKey" align="center" prop="appkey" />
|
||||
<el-table-column label="萤石云Secret" align="center" prop="secret" />
|
||||
<el-table-column label="设备厂商" align="center" prop="manufacturer" />
|
||||
<el-table-column label="是否重点" align="center" prop="keyPoint">
|
||||
<template #default="scope">{{scope.row.keyPoint==1?'是':'否' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:videoMonitor:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['manage:videoMonitor:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改延迟摄影管理对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="videoMonitorRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="${comment}" prop="comId">
|
||||
<el-input v-model="form.comId" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控名称" prop="monitorName">
|
||||
<el-input v-model="form.monitorName" placeholder="请输入监控名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控连接" prop="url">
|
||||
<el-input v-model="form.url" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="AppKey" prop="appkey">
|
||||
<el-input v-model="form.appkey" placeholder="请输入AppKey" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Secret" prop="secret">
|
||||
<el-input v-model="form.secret" placeholder="请输入Secret" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" prop="manufacturer">
|
||||
<el-input v-model="form.manufacturer" placeholder="请输入设备厂商" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否关键点" prop="keyPoint">
|
||||
<el-input v-model="form.keyPoint" placeholder="请输入是否关键点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="upadteTime">
|
||||
<el-date-picker clearable v-model="form.upadteTime" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择${comment}">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<videoMonitorDrawer ref="videoDrawer" @success="doSuccess"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="VideoMonitor">
|
||||
import {
|
||||
listVideoMonitor,
|
||||
getVideoMonitor,
|
||||
delVideoMonitor,
|
||||
addVideoMonitor,
|
||||
updateVideoMonitor,
|
||||
} from "@/api/manage/videoMonitor";
|
||||
import videoMonitorDrawer from "./videoMonitorDrawer.vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const videoMonitorList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const videoDrawer = ref();
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
monitorName: null,
|
||||
monitorType: null,
|
||||
url: null,
|
||||
appkey: null,
|
||||
secret: null,
|
||||
manufacturer: null,
|
||||
keyPoint: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
upadteTime: null,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询延迟摄影管理列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listVideoMonitor(queryParams.value).then((response) => {
|
||||
videoMonitorList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
monitorName: null,
|
||||
monitorType: null,
|
||||
url: null,
|
||||
appkey: null,
|
||||
secret: null,
|
||||
manufacturer: null,
|
||||
keyPoint: null,
|
||||
remark: null,
|
||||
state: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
upadteTime: null,
|
||||
};
|
||||
proxy.resetForm("videoMonitorRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
function doSuccess(){
|
||||
handleQuery();
|
||||
}
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
//reset();
|
||||
//open.value = true;
|
||||
//title.value = "添加延迟摄影管理";
|
||||
videoDrawer.value.showDrawer({
|
||||
type: "add",
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value;
|
||||
getVideoMonitor(_id).then((response) => {
|
||||
//form.value = response.data;
|
||||
//open.value = true;
|
||||
//title.value = "修改延迟摄影管理";
|
||||
videoDrawer.value.showDrawer({
|
||||
row: response.data,
|
||||
type: "edit",
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["videoMonitorRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateVideoMonitor(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addVideoMonitor(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除延迟摄影名称为【' + row.monitorName + '】的数据项?')
|
||||
.then(function () {
|
||||
return delVideoMonitor(_ids);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
"manage/videoMonitor/export",
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`videoMonitor_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
|
@ -0,0 +1,249 @@
|
|||
<template>
|
||||
<div class="video-monitor-list">
|
||||
<el-form ref="videoMonitorRef" label-width="120px" v-if="!data.currentPrjId">
|
||||
<el-form-item label="项目名称">
|
||||
<el-select :disabled="data.currentPrjId != '' || data.type == 'edit'" v-model="data.selPrjId"
|
||||
placeholder="请选择项目" clearable style="width:150px;" @change="loadData()">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row v-if="data.selPrjId" style="height: 100%;">
|
||||
<el-col :span="4" class="video-name-list">
|
||||
<div class="video-title command" @click="showAllVideo">设备列表</div>
|
||||
<div class="video-list">
|
||||
<div v-for="it in data.videoMonitors" :key="it.id" class="video-item command"
|
||||
:class="it.active ? 'is-active' : ''" @click="doSelectItem(it)">
|
||||
<svg-icon class-name="video-icon" icon-class="video" /> {{ it.monitorName }}
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :key="data.elKey" style="height: 100%;">
|
||||
<template v-if="data.showMode == 'sigle'">
|
||||
<iframe v-if="data.selVideo" frameborder="0" :src="data.selVideo.iframeSrc"
|
||||
style="width:100%;height:100%;" id="ysOpenDevice" allowfullscreen>
|
||||
</iframe>
|
||||
</template>
|
||||
<div v-if="data.showMode == 'all'" style="height: 100%;" class="all-mode">
|
||||
<div class="all-header">
|
||||
<svg-icon class-name="icon-screen command" @click="changeSize(2)"
|
||||
:class="data.showSize == 2 ? 'is-active' : ''" icon-class="4screen" />
|
||||
<svg-icon class-name="icon-screen command" @click="changeSize(4)"
|
||||
:class="data.showSize != 2 ? 'is-active' : ''" icon-class="9screen" />
|
||||
</div>
|
||||
<div class="all-list" :class="data.showSize == 2 ? 'mode1' : 'mode2'">
|
||||
<div class="all-item" v-for="it in data.showList" :key="it.id">
|
||||
<iframe frameborder="0" :src="it.iframeSrc" style="width:100%;height:100%;"
|
||||
id="ysOpenDevice" allowfullscreen>
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="all-pager">
|
||||
<el-pagination background :page-size="data.showSize" :current-page="data.showIndex"
|
||||
@current-change="handleCurrentChange" layout="prev, pager, next" :total="data.total" />
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="VideoMonitorList">
|
||||
import { findMyProjectList } from "@/api/publics";
|
||||
import {
|
||||
listVideoMonitor,
|
||||
getYsToken
|
||||
} from "@/api/manage/videoMonitor";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const userStore = useUserStore()
|
||||
const { proxy } = getCurrentInstance();
|
||||
const data = reactive({
|
||||
prjInfo: null,
|
||||
projects: [],
|
||||
selPrjId: '',
|
||||
currentPrjId: '',
|
||||
comId: '',
|
||||
videoMonitors: [],
|
||||
selVideo: null,
|
||||
elKey: 0,
|
||||
showMode: 'sigle',
|
||||
total: 0,
|
||||
showSize: 2,
|
||||
showIndex: 1,
|
||||
showList: [],
|
||||
})
|
||||
function loadVideo(it) {
|
||||
getYsToken(it.id).then(d => {
|
||||
it.accessToken = d.msg;
|
||||
it.iframeSrc = 'https://open.ys7.com/ezopen/h5/iframe?url=' + it.url + '&autoplay=1&accessToken=' + d.msg + '&t=' + (+new Date());
|
||||
|
||||
})
|
||||
}
|
||||
function changeSize(n) {
|
||||
data.showSize = n;
|
||||
data.showIndex = 1;
|
||||
showAllData();
|
||||
}
|
||||
function doSelectItem(it) {
|
||||
if (it.active) {
|
||||
return;
|
||||
}
|
||||
data.showMode = "sigle";
|
||||
if(data.selVideo){
|
||||
data.selVideo.active = false;
|
||||
}
|
||||
data.selVideo = it;
|
||||
data.selVideo.active = true;
|
||||
loadVideo(data.selVideo);
|
||||
}
|
||||
function showAllVideo() {
|
||||
data.selVideo.active = false;
|
||||
data.selVideo = null;
|
||||
data.showMode = "all";
|
||||
data.showSize = 2;
|
||||
data.showIndex = 1;
|
||||
showAllData();
|
||||
}
|
||||
function handleCurrentChange(n) {
|
||||
data.showIndex = n;
|
||||
showAllData();
|
||||
}
|
||||
function showAllData() {
|
||||
var start = (data.showIndex - 1) * data.showSize;
|
||||
var end = start + data.showSize;
|
||||
data.showList = [];
|
||||
for (var i = start; i < end && i < data.videoMonitors.length; i++) {
|
||||
data.showList.push(data.videoMonitors[i]);
|
||||
loadVideo(data.videoMonitors[i])
|
||||
}
|
||||
data.elKey++;
|
||||
}
|
||||
function loadData() {
|
||||
let objs = data.projects.filter(d => d.id == data.selPrjId);
|
||||
if (objs.length == 0) {
|
||||
data.videoMonitors = [];
|
||||
return;
|
||||
}
|
||||
listVideoMonitor({
|
||||
pageNum: 1, pageSize: 100,
|
||||
projectId: objs[0].id,
|
||||
comId: objs[0].comId
|
||||
}).then(d => {
|
||||
data.total = d.total;
|
||||
data.videoMonitors = (d.rows || []).map(it => {
|
||||
it.active = false;
|
||||
return it;
|
||||
});
|
||||
data.selVideo = data.videoMonitors.length > 0 ? data.videoMonitors[0] : null;
|
||||
if (data.selVideo) {
|
||||
data.selVideo.active = true;
|
||||
loadVideo(data.selVideo);
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 查询项目列表 */
|
||||
function getProjectList() {
|
||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.projects = response.rows;
|
||||
if (userStore.currentPrjId) {
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
data.selPrjId = userStore.currentPrjId;
|
||||
data.comId = userStore.currentComId
|
||||
loadData();
|
||||
}
|
||||
});
|
||||
}
|
||||
getProjectList();
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.video-monitor-list {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
|
||||
.video-name-list {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
box-shadow: 2px 2px 10px #ddd;
|
||||
margin-bottom: 30px;
|
||||
word-wrap: break-word;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #ddd;
|
||||
|
||||
.video-icon {
|
||||
fill: #ccc;
|
||||
}
|
||||
|
||||
.video-title {
|
||||
line-height: 40px;
|
||||
background: #e0d5d588;
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.video-list {
|
||||
line-height: 30px;
|
||||
|
||||
.video-item {
|
||||
padding: 0px 10px;
|
||||
|
||||
&.is-active {
|
||||
background: #87cefa88;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.all-mode {
|
||||
.all-header {
|
||||
text-align: right;
|
||||
|
||||
.icon-screen {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
background: #BFC3C5;
|
||||
fill: #fff;
|
||||
margin-left: 10px;
|
||||
|
||||
&.is-active {
|
||||
background: #445A65;
|
||||
fill: #4D91FE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.all-list {
|
||||
display:grid;
|
||||
grid-gap: 10px;
|
||||
height: calc(100% - 80px);
|
||||
&.mode1{
|
||||
grid-template-columns: 50% 50%;
|
||||
grid-template-rows: 50% 50%;
|
||||
.all-item{
|
||||
|
||||
}
|
||||
}
|
||||
&.mode2{
|
||||
grid-template-columns: 33% 33% 33%;
|
||||
grid-template-rows: 33% 33% 33%;
|
||||
.all-item{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.all-pager {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,133 @@
|
|||
<template>
|
||||
<el-drawer class="video-monitor-drawer" v-if="data.isOpen" v-model="data.isOpen" direction="rtl" size="50%"
|
||||
style="padding-left: 20px" :title="data.title">
|
||||
<el-form ref="videoMonitorRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="项目名称" prop="projectId">
|
||||
<el-select :disabled="data.currentPrjId != ''||data.type=='edit'" v-model="form.projectId" placeholder="请选择项目" clearable
|
||||
style="width:150px;">
|
||||
<el-option v-for="prj in data.projects" :key="prj.id" :label="prj.projectName" :value="prj.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控名称" prop="monitorName">
|
||||
<el-input v-model="form.monitorName" placeholder="请输入监控名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控类型" prop="monitorType">
|
||||
<el-select v-model="form.monitorType">
|
||||
<el-option label="萤石云" value="萤石云"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控链接" prop="url">
|
||||
<el-input v-model="form.url" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="萤石云AppKey" prop="appkey">
|
||||
<el-input v-model="form.appkey" placeholder="请输入萤石云AppKey" />
|
||||
</el-form-item>
|
||||
<el-form-item label="萤石云Secret" prop="secret">
|
||||
<el-input v-model="form.secret" placeholder="请输入萤石云Secret" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" prop="manufacturer">
|
||||
<el-input v-model="form.manufacturer" placeholder="请输入设备厂商" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否重点" prop="keyPoint">
|
||||
<el-select v-model="form.keyPoint">
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center;">
|
||||
<el-button type="primary" @click="doSave">确定</el-button>
|
||||
<el-button @click="doCancel">取消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listVideoMonitor, getVideoMonitor, delVideoMonitor, addVideoMonitor, updateVideoMonitor } from "@/api/manage/videoMonitor";
|
||||
import { findMyProjectList } from "@/api/publics";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const $emit=defineEmits("success")
|
||||
const userStore = useUserStore()
|
||||
const { proxy } = getCurrentInstance();
|
||||
const form = ref({})
|
||||
const rules = reactive({
|
||||
projectId: [{ required: true, trigger: ['blur', 'change'], message: "请选择所属项目" }],
|
||||
monitorName: [{ required: true, trigger: ['blur', 'change'], message: "请输入监控名称" }],
|
||||
monitorType: [{ required: true, trigger: ['blur', 'change'], message: "请选择监控类型" }],
|
||||
url: [{ required: true, trigger: ['blur', 'change'], message: "请输入监控链接" }],
|
||||
appkey: [{ required: true, trigger: ['blur', 'change'], message: "请输入萤石云AppKey" }],
|
||||
secret: [{ required: true, trigger: ['blur', 'change'], message: "请输入萤石云Secret" }],
|
||||
})
|
||||
const data = reactive({
|
||||
isOpen: false,
|
||||
prjInfo: null,
|
||||
type: '',
|
||||
projects: [],
|
||||
currentPrjId: '',
|
||||
editRow:null,
|
||||
comId: '',
|
||||
})
|
||||
|
||||
function showDrawer(opt) {
|
||||
data.type = opt.type;
|
||||
data.title = opt.type == 'add' ? '视频监控 - 增加' : '视频监控 - 修改'
|
||||
if(opt.type=='edit'){
|
||||
data.editRow=opt.row;
|
||||
form.value=opt.row;
|
||||
}else{
|
||||
data.editRow=null;
|
||||
form.value={}
|
||||
}
|
||||
form.value.monitorType = "萤石云";
|
||||
form.value.keyPoint = '0';
|
||||
data.isOpen = true;
|
||||
}
|
||||
/** 查询项目列表 */
|
||||
function getProjectList() {
|
||||
findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
data.projects = response.rows;
|
||||
if (userStore.currentPrjId) {
|
||||
data.currentPrjId = userStore.currentPrjId;
|
||||
data.comId = userStore.currentComId
|
||||
form.value.projectId = data.currentPrjId;
|
||||
}
|
||||
});
|
||||
}
|
||||
function getSelectProject(){
|
||||
let objs=data.projects.filter(d=>d.id==form.value.projectId);
|
||||
return objs.length>0?objs[0]:{id:data.currentPrjId,comId:userStore.currentComId};
|
||||
}
|
||||
|
||||
function doSave() {
|
||||
proxy.$refs["videoMonitorRef"].validate(valid => {
|
||||
if (valid) {
|
||||
let prj=getSelectProject();
|
||||
form.value.projectId=prj.id;
|
||||
form.value.comId=prj.comId;
|
||||
if (form.value.id != null) {
|
||||
updateVideoMonitor(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
data.isOpen=false
|
||||
$emit("success")
|
||||
});
|
||||
} else {
|
||||
addVideoMonitor(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
data.isOpen=false
|
||||
$emit("success")
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function doCancel() {
|
||||
data.isOpen = false;
|
||||
}
|
||||
getProjectList();
|
||||
defineExpose({
|
||||
showDrawer
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss"></style>
|
Loading…
Reference in New Issue