Commit 6884732b authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of ssh://111.61.77.35:15/lizhichao/whp-xl into master

parents d5999024 480f153f
...@@ -84,15 +84,15 @@ ...@@ -84,15 +84,15 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="createTime" label="创建时间"></el-table-column> --> <!-- <el-table-column prop="createTime" label="创建时间"></el-table-column> -->
<el-table-column label="操作" width="220" align="center"> <el-table-column label="操作" width="260" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" plain @click="detailFun(scope.row)" size="small" v-if="scope.row.checkStatus == 1">
<i class="el-icon-view"></i> 详情
</el-button>
<el-button @click="editFun(scope.row)" size="small" v-if="scope.row.checkStatus != 1"> <el-button @click="editFun(scope.row)" size="small" v-if="scope.row.checkStatus != 1">
<i class="el-icon-edit-outline"></i> 编辑 <i class="el-icon-edit-outline"></i> 编辑
</el-button> </el-button>
<el-button type="primary" plain @click="editFun(scope.row)" size="small" v-if="!qyvisble"> <el-button type="danger" @click="delFun(scope.row)" size="small" v-if="scope.row.checkStatus != 1">
查看详情
</el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small" v-if="qyvisble">
<i class="el-icon-delete"></i> 删除 <i class="el-icon-delete"></i> 删除
</el-button> </el-button>
</template> </template>
...@@ -165,6 +165,7 @@ export default class CamerasMg extends Vue { ...@@ -165,6 +165,7 @@ export default class CamerasMg extends Vue {
this.getTableData(); this.getTableData();
} }
addFun() { addFun() {
this.dialogTit = "新增预案";
this.zjKey++; this.zjKey++;
this.dialogVisible = true; this.dialogVisible = true;
} }
...@@ -174,6 +175,12 @@ export default class CamerasMg extends Vue { ...@@ -174,6 +175,12 @@ export default class CamerasMg extends Vue {
this.zjKey++; this.zjKey++;
this.dialogVisible = true; this.dialogVisible = true;
} }
detailFun(row: any){
this.dialogTit = "详情";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
delFun(row: any) { delFun(row: any) {
let that = this as any; let that = this as any;
METHOD.deleteFun( METHOD.deleteFun(
......
...@@ -23,16 +23,17 @@ ...@@ -23,16 +23,17 @@
<el-form-item label="预案等级:"> <el-form-item label="预案等级:">
<font>{{editForm.planLevel + '级'}}</font> <font>{{editForm.planLevel + '级'}}</font>
</el-form-item> </el-form-item>
<el-form-item label="预案源文件"> <el-form-item label="预案源文件:">
<span <span
class="dbtn sd qiCr" class="dbtn sd qiCr"
@click="checkFile(editForm.sourceFile)" @click="checkFile(editForm.sourceFile)"
v-if="editForm.sourceFile != ''" v-if="editForm.sourceFile != '' && editForm.fileOriginalName != ''"
> >
<i class="el-icon el-icon-view"></i> <i class="el-icon el-icon-view"></i>
{{editForm.fileOriginalName}} {{editForm.fileOriginalName}}
</span> </span>
</el-form-item> </el-form-item>
<div v-if="title != '详情'">
<el-form-item label="审核预案" prop="checkStatus"> <el-form-item label="审核预案" prop="checkStatus">
<el-radio-group v-model="editForm.checkStatus"> <el-radio-group v-model="editForm.checkStatus">
<el-radio label="0">待审核</el-radio> <el-radio label="0">待审核</el-radio>
...@@ -43,20 +44,32 @@ ...@@ -43,20 +44,32 @@
<el-form-item label="审核意见"> <el-form-item label="审核意见">
<el-input type="textarea" v-model="editForm.remarks"></el-input> <el-input type="textarea" v-model="editForm.remarks"></el-input>
</el-form-item> </el-form-item>
</div>
<div v-else>
<el-form-item label="审核状态:">
<!--<font>{{editForm.checkStatus == 0 ? '已上报' : '未上报'}}</font>-->
<span v-if="editForm.checkStatus == 0">待审核</span>
<span v-if="editForm.checkStatus == 1">审核通过</span>
<span v-if="editForm.checkStatus == 2">审核未通过</span>
</el-form-item>
<el-form-item label="审核意见:">
<font>{{editForm.remarks}}</font>
</el-form-item>
</div>
</el-form> </el-form>
</div> </div>
</el-col> </el-col>
<el-col :span="12" class="flcolum"> <el-col :span="12" class="flcolum">
<div> <div>
<div class="yatit">预案内容</div> <div class="yatit">预案内容</div>
<div v-html="editForm.planContents"></div> <div v-html="editForm.planContents" style="height:450px; border:solid 1px #ccc; overflow: auto"></div>
<font v-if="editForm.planContents == ''">暂无内容~</font> <font v-if="editForm.planContents == ''">暂无内容~</font>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="confirmFun('editForm')">提交</el-button> <el-button type="primary" size="small" @click="confirmFun('editForm')" v-if="title != '详情'">提交</el-button>
<el-button @click="$emit('dialogFun')" size="small">取消</el-button> <el-button @click="$emit('dialogFun')" size="small">取消查看</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
:show-close="false" :show-close="false"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<div v-if="qyvisble"> <div v-if="title != '详情'">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12" class="flcolum"> <el-col :span="12" class="flcolum">
<div> <div>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<a v-for="(i,ind) in fileList" :key="ind" :href="i.url" target="_blank">{{i.name}}</a>&nbsp;&nbsp;&nbsp;<i class="btn el-icon-delete" @click="deleteList"></i> <a v-for="(i,ind) in fileList" :key="ind" :href="i.url" target="_blank">{{i.name}}</a>&nbsp;&nbsp;&nbsp;<i class="btn el-icon-delete" @click="deleteList"></i>
</div>--> </div>-->
</el-form-item> </el-form-item>
<el-form-item label="审核意见"> <el-form-item label="审核意见" v-if="editForm.remarks != '' && editForm.remarks != null">
<font>{{editForm.remarks}}</font> <font>{{editForm.remarks}}</font>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -96,19 +96,28 @@ ...@@ -96,19 +96,28 @@
<span <span
class="dbtn sd qiCr" class="dbtn sd qiCr"
@click="checkFile(editForm.sourceFile)" @click="checkFile(editForm.sourceFile)"
v-if="editForm.sourceFile != ''" v-if="editForm.sourceFile != '' && editForm.fileOriginalName != ''"
> >
<i class="el-icon el-icon-view"></i> <i class="el-icon el-icon-view"></i>
{{editForm.fileOriginalName}} {{editForm.fileOriginalName}}
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="审核状态:" v-if="editForm.isReported == 0">
<!--<font>{{editForm.checkStatus == 0 ? '已上报' : '未上报'}}</font>-->
<span v-if="editForm.checkStatus == 0">待审核</span>
<span v-if="editForm.checkStatus == 1">审核通过</span>
<span v-if="editForm.checkStatus == 2">审核未通过</span>
</el-form-item>
<el-form-item label="审核意见:" v-if="editForm.remarks != '' && editForm.remarks != null">
<font>{{editForm.remarks}}</font>
</el-form-item>
</el-form> </el-form>
</div> </div>
</el-col> </el-col>
<el-col :span="12" class="flcolum"> <el-col :span="12" class="flcolum">
<div> <div>
<div class="yatit">预案内容</div> <div class="yatit">预案内容</div>
<div v-html="editForm.planContents"></div> <div v-html="editForm.planContents" style="height:420px; border:solid 1px #ccc; overflow: auto"></div>
<font v-if="editForm.planContents == ''">暂无内容~</font> <font v-if="editForm.planContents == ''">暂无内容~</font>
</div> </div>
</el-col> </el-col>
...@@ -271,6 +280,7 @@ export default class PlansMgEdit extends Vue { ...@@ -271,6 +280,7 @@ export default class PlansMgEdit extends Vue {
that.enterpriseId = METHOD.enterpriseId; that.enterpriseId = METHOD.enterpriseId;
// if (that.enterpriseId) { // if (that.enterpriseId) {
// that.qyvisble = true; // that.qyvisble = true;
if(this.title != '详情') {
that.$nextTick(() => { that.$nextTick(() => {
that.creatEditor(); that.creatEditor();
}) })
...@@ -290,6 +300,7 @@ export default class PlansMgEdit extends Vue { ...@@ -290,6 +300,7 @@ export default class PlansMgEdit extends Vue {
}); });
} }
}); });
}
// } // }
that.actionUrl = METHOD.URL + "/file/uploadFile"; that.actionUrl = METHOD.URL + "/file/uploadFile";
} }
......
...@@ -67,9 +67,12 @@ ...@@ -67,9 +67,12 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="220" align="center"> <el-table-column label="操作" width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="success" @click="checkFun(scope.row)" size="small" :disabled="scope.row.checkStatus != 0?true:false"> <el-button type="primary" plain @click="detailFun(scope.row)" size="small">
<i class="el-icon-view"></i> 详情
</el-button>
<el-button type="success" @click="checkFun(scope.row)" size="small" v-if="scope.row.checkStatus == 0">
<i class="el-icon-key"></i> 审核 <i class="el-icon-key"></i> 审核
</el-button> </el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small"> <el-button type="danger" @click="delFun(scope.row)" size="small">
...@@ -142,6 +145,12 @@ export default class CamerasMg extends Vue { ...@@ -142,6 +145,12 @@ export default class CamerasMg extends Vue {
this.searchData = {}; this.searchData = {};
this.getTableData(); this.getTableData();
} }
detailFun(row: any){
this.dialogTit = "详情";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
checkFun(row: any){ checkFun(row: any){
this.dialogTit = "预案审核"; this.dialogTit = "预案审核";
this.formData = Object.assign({}, row); this.formData = Object.assign({}, row);
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<el-form :inline="true" :model="searchData"> <el-form :inline="true" :model="searchData">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="searchData.dataType" placeholder="请选择设备类型"> <el-select v-model="searchData.dataType" placeholder="请选择设备类型">
<el-option label="监控设备" value="5"></el-option> <el-option label="监控设备" value="1"></el-option>
<el-option label="传感器" value="6"></el-option> <el-option label="传感器" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
...@@ -37,10 +37,11 @@ ...@@ -37,10 +37,11 @@
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="loading"> <el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="loading">
<el-table-column width="50" type="index" label="序号"></el-table-column> <el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="enterpriseName" label="企业名称"></el-table-column> <el-table-column prop="enterpriseName" label="企业名称"></el-table-column>
<el-input type="hidden" pro="enterpriseId"></el-input>
<el-table-column prop="deviceName" label="设备名称"></el-table-column> <el-table-column prop="deviceName" label="设备名称"></el-table-column>
<el-table-column prop="deviceName" label="设备类型"> <el-table-column prop="deviceName" label="设备类型">
<template slot-scope="scope"> <template slot-scope="scope">
<font>{{ scope.row.dataType == 5 ? '监控设备' : '传感器'}}</font> <font>{{ scope.row.dataType == 1 ? '监控设备' : '传感器'}}</font>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="deviceIp" label="设备IP"></el-table-column> <el-table-column prop="deviceIp" label="设备IP"></el-table-column>
...@@ -141,8 +142,10 @@ export default class SafetyDeviceMg extends Vue { ...@@ -141,8 +142,10 @@ export default class SafetyDeviceMg extends Vue {
addFun() { addFun() {
this.zjKey++; this.zjKey++;
this.dialogVisible = true; this.dialogVisible = true;
this.formData.dataType = this.searchData.dataType; //this.formData.dataType = this.searchData.dataType;
this.formData.enterpriseId = this.enterpriseId; if(METHOD.enterpriseId){
this.formData.enterpriseId = METHOD.enterpriseId;
}
} }
editFun(row: any) { editFun(row: any) {
this.dialogTit = "编辑"; this.dialogTit = "编辑";
......
...@@ -6,11 +6,21 @@ ...@@ -6,11 +6,21 @@
:show-close="false" :show-close="false"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form ref="editForm" :model="editForm" :rules="rules" label-width="100px"> <el-form ref="editForm" :model="editForm" :rules="rules" label-width="106px">
<el-form-item label="选择企业" prop="enterpriseId" v-if="play">
<el-select v-model="editForm.enterpriseId" placeholder="请选择" @change="seletChange">
<el-option
v-for="item in enterpriseList"
:key="item.enterpriseId"
:label="item.unitName"
:value="item.enterpriseId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备类型" prop="dataType"> <el-form-item label="设备类型" prop="dataType">
<el-select v-model="editForm.dataType"> <el-select v-model="editForm.dataType">
<el-option label="监控设备" value="5"></el-option> <el-option label="监控设备" value="1"></el-option>
<el-option label="传感器" value="6"></el-option> <el-option label="传感器" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="设备名称" prop="deviceName"> <el-form-item label="设备名称" prop="deviceName">
...@@ -40,26 +50,36 @@ ...@@ -40,26 +50,36 @@
<el-form-item label="所在厂区位置" prop="factoryLocation"> <el-form-item label="所在厂区位置" prop="factoryLocation">
<el-input v-model="editForm.factoryLocation"></el-input> <el-input v-model="editForm.factoryLocation"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="经度" prop="longitude"> <p style="color: #F56C6C;float: left;position: relative;left: 45px;">*</p>
<el-form-item label="经纬度">
<el-row> <el-row>
<el-col :span="16"> <el-col :span="8">
<!--<el-input v-model="editForm.longitude"></el-input>-->
<el-form-item prop="longitude" style="margin-right: 9px">
<el-input v-model="editForm.longitude"></el-input> <el-input v-model="editForm.longitude"></el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="latitude" style="margin-right: 9px">
<el-input v-model="editForm.latitude"></el-input>
</el-form-item>
<!--<el-input v-model="editForm.latitude"></el-input>-->
</el-col>
<el-col :span="6">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button> <el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="纬度" prop="latitude"> <!--<el-form-item label="纬度" prop="latitude">
<el-input v-model="editForm.latitude"></el-input> <el-input v-model="editForm.latitude"></el-input>
</el-form-item> </el-form-item>-->
<el-form-item label="联系电话" prop="phone"> <el-form-item label="联系电话" prop="phone">
<el-input v-model="editForm.phone"></el-input> <el-input v-model="editForm.phone"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物品类型" prop="category"> <el-form-item label="物品类型" prop="category">
<el-input v-model="editForm.category"></el-input> <el-input v-model="editForm.category"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="否是重大危险源" prop="isBigDanger"> <!--<el-form-item label="否是重大危险源" prop="isBigDanger">
<el-radio-group v-model="editForm.isBigDanger"> <el-radio-group v-model="editForm.isBigDanger">
<el-radio :label="'0'"></el-radio> <el-radio :label="'0'"></el-radio>
<el-radio :label="'1'"></el-radio> <el-radio :label="'1'"></el-radio>
...@@ -72,7 +92,7 @@ ...@@ -72,7 +92,7 @@
<el-option value="三级"></el-option> <el-option value="三级"></el-option>
<el-option value="四级"></el-option> <el-option value="四级"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item label="联系人" prop="contacts"> <el-form-item label="联系人" prop="contacts">
<el-input v-model="editForm.contacts"></el-input> <el-input v-model="editForm.contacts"></el-input>
</el-form-item> </el-form-item>
...@@ -106,6 +126,7 @@ import METHOD from "@/utils/methods"; ...@@ -106,6 +126,7 @@ import METHOD from "@/utils/methods";
export default class SafetyDeviceMgEdit extends Vue { export default class SafetyDeviceMgEdit extends Vue {
//属性或参数中使用!:表示强制解析(告诉typescript编译器,这里一定有值),常用于vue-decorator中的@Prop //属性或参数中使用!:表示强制解析(告诉typescript编译器,这里一定有值),常用于vue-decorator中的@Prop
@Prop(Boolean) dialogVisible!: Boolean; @Prop(Boolean) dialogVisible!: Boolean;
@Provide() loading: Boolean = false;
@Prop(Object) editForm!: { @Prop(Object) editForm!: {
deviceName: String; deviceName: String;
longitude: Number; longitude: Number;
...@@ -114,21 +135,23 @@ export default class SafetyDeviceMgEdit extends Vue { ...@@ -114,21 +135,23 @@ export default class SafetyDeviceMgEdit extends Vue {
enterpriseId: String; enterpriseId: String;
}; };
@Prop(String) title!: String; @Prop(String) title!: String;
// @Provide() editForm: any = {};
@Provide() enterpriseList: any = [];
@Provide() qvvalue: any = []; //区域值 @Provide() qvvalue: any = []; //区域值
@Provide() signsArr: any = []; //图例list @Provide() signsArr: any = []; //图例list
@Provide() dialogTableVisible: Boolean = false; @Provide() dialogTableVisible: Boolean = false;
@Provide() rules: any = { @Provide() rules: any = {
enterpriseId: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
deviceName: [ deviceName: [
{ required: true, trigger: "blur", message: "该项为必填项!" } { required: true, trigger: "blur", message: "该项为必填项!" }
], ],
dataType: [{ required: true, trigger: "blur", message: "该项为必填项!" }], dataType: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
isBigDanger: [ /*isBigDanger: [
{ required: true, trigger: "blur", message: "该项为必填项!" } { required: true, trigger: "blur", message: "该项为必填项!" }
], ],
dangerGrade: [ dangerGrade: [
{ required: true, trigger: "blur", message: "该项为必填项!" } { required: true, trigger: "blur", message: "该项为必填项!" }
], ],*/
factoryLocation: [ factoryLocation: [
{ required: true, trigger: "blur", message: "该项为必填项!" } { required: true, trigger: "blur", message: "该项为必填项!" }
], ],
...@@ -136,6 +159,7 @@ export default class SafetyDeviceMgEdit extends Vue { ...@@ -136,6 +159,7 @@ export default class SafetyDeviceMgEdit extends Vue {
latitude: [{ required: true, trigger: "blur", message: "该项为必填项!" }] latitude: [{ required: true, trigger: "blur", message: "该项为必填项!" }]
}; };
@Provide() loadmap: Boolean = false; @Provide() loadmap: Boolean = false;
@Provide() play: Boolean = false;
@Provide() enterpriseId: string = "dbe0c3268a3c4911913f35a2fdcd0e3e"; @Provide() enterpriseId: string = "dbe0c3268a3c4911913f35a2fdcd0e3e";
qrFun(v: any) { qrFun(v: any) {
...@@ -161,7 +185,7 @@ export default class SafetyDeviceMgEdit extends Vue { ...@@ -161,7 +185,7 @@ export default class SafetyDeviceMgEdit extends Vue {
if (valid) { if (valid) {
METHOD.axiosPost( METHOD.axiosPost(
that, that,
`/safetyDeviceInfo/addOrEditSafetyDeviceInfo/${that.enterpriseId}`, `/safetyDeviceInfo/addOrEditSafetyDeviceInfo`,
params, params,
function(res: any) { function(res: any) {
if (res.code == 0) { if (res.code == 0) {
...@@ -179,9 +203,52 @@ export default class SafetyDeviceMgEdit extends Vue { ...@@ -179,9 +203,52 @@ export default class SafetyDeviceMgEdit extends Vue {
} }
}); });
} }
getnterpriseListInfo() {
let that = this,
param ={accountStatus:'0'};
that.loading = true;
METHOD.axiosPost(
that,
`/enterpriseInfo/queryEnterpriseListInfo`,
param,
function(res: any) {
that.loading = false;
if (res.code == 0) {
that.enterpriseList = res.data;
}
}
);
}
getnterpriseListInfo() {
let that = this,
param ={accountStatus:'0'};
that.loading = true;
METHOD.axiosPost(
that,
`/enterpriseInfo/queryEnterpriseListInfo`,
param,
function(res: any) {
that.loading = false;
if (res.code == 0) {
that.enterpriseList = res.data;
}
}
);
}
seletChange(enterpriseId: any) {
let that = this,
arr;
arr = that.enterpriseList.filter((ele: any) => enterpriseId == ele.enterpriseId);
that.editForm.enterpriseListId = arr[0].enterpriseId;
}
created() { created() {
//this.editForm = this.editFormData;
if(METHOD.enterpriseId){ if(METHOD.enterpriseId){
this.enterpriseId = METHOD.enterpriseId; this.enterpriseId = METHOD.enterpriseId;
}else{
//政府用户
this.play = true;
this.getnterpriseListInfo();
} }
} }
} }
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
that.playerWindow = 'newplay' + that.flag; that.playerWindow = 'newplay' + that.flag;
var player = new WasmPlayer(null, that.playerWindow, null, {Height: true}); var player = new WasmPlayer(null, that.playerWindow, null, {Height: true});
// console.log(that.playerWindow, node.data.deviceNumber) // console.log(that.playerWindow, node.data.deviceNumber)
player.play('http://27.128.189.137:10001/flv/hls/' + that.treecheckedObj.deviceNumber + '.flv', 1); player.play('http://27.128.189.137:18000/flv/hls/' + that.treecheckedObj.deviceNumber + '.flv', 1);
if(that.flag < 4) { if(that.flag < 4) {
that.flag++; that.flag++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment