|
@@ -13,19 +13,34 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
- <el-button icon="el-icon-plus" size="mini" @click="goAdd">新增</el-button>
|
|
|
|
|
|
|
+ <el-button icon="el-icon-plus" size="mini" v-hasPermi="['system:report:add']" @click="goAdd">新增</el-button>
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ title="确定要合并所选报备?"
|
|
|
|
|
+ @confirm="mergeReport"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button slot="reference" icon="el-icon-notebook-2" v-hasPermi="['system:report:sp']" size="mini" style="margin-left: 10px">合并</el-button>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+<!-- <el-button icon="el-icon-notebook-2" size="mini" @click="mergeReport">合并</el-button>-->
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<div style=" position: absolute;top: 0;right: 0;">
|
|
<div style=" position: absolute;top: 0;right: 0;">
|
|
|
- <el-button type="primary" icon="el-icon-warning-outline" size="mini" @click="handleQuery">冲突检测</el-button>
|
|
|
|
|
- <el-button type="primary" icon="el-icon-help" size="mini" @click="handleQuery">合并检测</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-warning-outline" v-hasPermi="['system:report:sp']" size="mini" @click="handlect">冲突检测</el-button>
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-help" size="mini" v-hasPermi="['system:report:sp']" @click="handlemerge">合并检测</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
|
|
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
- <!-- <el-table-column label="id" align="center" prop="id" /> -->
|
|
|
|
|
|
|
+ <el-table ref="listtbl" v-loading="loading" :data="reportList" default-expand-all row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @select="tblselect" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
|
|
|
|
|
+ <el-table-column type="selection" width="40" align="center" @selectable="selectable"/>
|
|
|
|
|
+<!-- <el-table-column-->
|
|
|
|
|
+<!-- type="index"-->
|
|
|
|
|
+<!-- width="50" fixed="left">-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+ <el-table-column label="编号" align="center" prop="id" fixed="left" width='200'>
|
|
|
|
|
+ <template v-slot:="scope">
|
|
|
|
|
+ <span>{{scope.row.id}}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="施工路段" align="center" prop="section" width='200' fixed="left"/>
|
|
<el-table-column label="施工路段" align="center" prop="section" width='200' fixed="left"/>
|
|
|
<el-table-column label="方向" align="center" prop="direction" width='100'>
|
|
<el-table-column label="方向" align="center" prop="direction" width='100'>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -49,8 +64,8 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="施工内容二" align="center" prop="contentTwo" width="120">
|
|
<el-table-column label="施工内容二" align="center" prop="contentTwo" width="120">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag v-if="scope.row.contentOne == 2" :options="dict.type.content_two" :value="scope.row.contentTwo"/>
|
|
|
|
|
- <div v-if="scope.row.contentOne != 2">{{scope.row.contentTwo}}</div>
|
|
|
|
|
|
|
+ <dict-tag :options="dict.type.content_two" :value="scope.row.contentTwo"/>
|
|
|
|
|
+<!-- <div v-if="scope.row.contentOne != 2">{{scope.row.contentTwo}}</div>-->
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="占用车道" align="center" prop="lane" />
|
|
<el-table-column label="占用车道" align="center" prop="lane" />
|
|
@@ -77,22 +92,48 @@
|
|
|
<!-- <div v-if="scope.row.report_status != 2">{{scope.row.contentTwo}}</div> -->
|
|
<!-- <div v-if="scope.row.report_status != 2">{{scope.row.contentTwo}}</div> -->
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div v-if="scope.row.isMerge==='-1'">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
|
|
+
|
|
|
|
|
+ >查看</el-button>
|
|
|
|
|
+ <el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
|
|
|
+ v-if="scope.row.status==='1'"
|
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['system:report:edit']"
|
|
v-hasPermi="['system:report:edit']"
|
|
|
>修改</el-button>
|
|
>修改</el-button>
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="text"
|
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
|
- v-hasPermi="['system:report:remove']"
|
|
|
|
|
- >删除</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
|
+ v-if="scope.row.status==='1'"
|
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
|
+ v-hasPermi="['system:report:remove']"
|
|
|
|
|
+ >删除</el-button>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ v-if="scope.row.status==='2' && scope.row.auditDept+'' === currentuserdeptid+''"
|
|
|
|
|
+ @click="handleSP(scope.row)"
|
|
|
|
|
+ v-hasPermi="['system:report:sp']"
|
|
|
|
|
+
|
|
|
|
|
+ >审批</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -106,63 +147,32 @@
|
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <!-- 添加或修改【请填写功能名称】对话框 -->
|
|
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
- <el-form-item label="施工计划id" prop="planId">
|
|
|
|
|
- <el-input v-model="form.planId" placeholder="请输入施工计划id" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="占用车道" prop="lane">
|
|
|
|
|
- <el-input v-model="form.lane" placeholder="请输入占用车道" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="预计开始时间" prop="startTime">
|
|
|
|
|
- <el-date-picker clearable
|
|
|
|
|
- v-model="form.startTime"
|
|
|
|
|
- type="date"
|
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
- placeholder="请选择预计开始时间">
|
|
|
|
|
- </el-date-picker>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="预计结束时间" prop="endTime">
|
|
|
|
|
- <el-date-picker clearable
|
|
|
|
|
- v-model="form.endTime"
|
|
|
|
|
- type="date"
|
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
- placeholder="请选择预计结束时间">
|
|
|
|
|
- </el-date-picker>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="现场负责人" prop="manageUser">
|
|
|
|
|
- <el-input v-model="form.manageUser" placeholder="请输入现场负责人" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="现场负责人手机号" prop="managePhone">
|
|
|
|
|
- <el-input v-model="form.managePhone" placeholder="请输入现场负责人手机号" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="现场安全员" prop="saveUser">
|
|
|
|
|
- <el-input v-model="form.saveUser" placeholder="请输入现场安全员" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="安全员手机号" prop="savePhone">
|
|
|
|
|
- <el-input v-model="form.savePhone" placeholder="请输入安全员手机号" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="填报人" prop="createUser">
|
|
|
|
|
- <el-input v-model="form.createUser" placeholder="请输入填报人" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="修改人" prop="updateUser">
|
|
|
|
|
- <el-input v-model="form.updateUser" placeholder="请输入修改人" />
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="施工审批" :visible.sync="spvisible" width="500px" append-to-body>
|
|
|
|
|
+ <el-form ref="form" :model="spform" label-width="80px">
|
|
|
|
|
+ <el-form-item label="" >
|
|
|
|
|
+ <el-input v-model="spform.msg" type="textarea" placeholder="请输入审批意见" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="是否合并 0:否 1:是" prop="isMerge">
|
|
|
|
|
- <el-input v-model="form.isMerge" placeholder="请输入是否合并 0:否 1:是" />
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="" >
|
|
|
|
|
+ <el-radio v-model="spform.status" label="1">同意</el-radio>
|
|
|
|
|
+ <el-radio v-model="spform.status" label="2">不同意</el-radio>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="submitForm">保 存</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { listReport, getReport, delReport, addReport, updateReport } from "@/api/system/report";
|
|
|
|
|
|
|
+import { listReport, getReport, delReport, addReport, updateReport,collisionDetection,mergeQuery,mergeReport } from "@/api/system/report";
|
|
|
|
|
+import moment from "moment";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "Report",
|
|
name: "Report",
|
|
@@ -171,6 +181,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
// 遮罩层
|
|
// 遮罩层
|
|
|
loading: true,
|
|
loading: true,
|
|
|
|
|
+ spvisible:false,
|
|
|
// 选中数组
|
|
// 选中数组
|
|
|
ids: [],
|
|
ids: [],
|
|
|
// 非单个禁用
|
|
// 非单个禁用
|
|
@@ -207,15 +218,36 @@ export default {
|
|
|
form: {},
|
|
form: {},
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {
|
|
rules: {
|
|
|
|
|
+ },
|
|
|
|
|
+ // currentuserdeptid:"",
|
|
|
|
|
+ spform:{
|
|
|
|
|
+ status:"1",
|
|
|
|
|
+ reportid:0,
|
|
|
|
|
+ msg:"",
|
|
|
|
|
+ ext1:"",
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
|
|
+ computed:{
|
|
|
|
|
+ currentuserdeptid() {
|
|
|
|
|
+ return this.$store.state.user.dept.deptId;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.$parent.divSelect =2;
|
|
|
|
|
+ this.$parent.activeIndex='1';
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
goAdd(){
|
|
goAdd(){
|
|
|
- this.$router.push({path: '/addReport',query:{ routerName:'新增'}})
|
|
|
|
|
|
|
+ localStorage.setItem("currentreport",JSON.stringify({ routerName:'新增'}));
|
|
|
|
|
+ this.$router.push({path: '/addReport'})
|
|
|
},
|
|
},
|
|
|
/** 查询【请填写功能名称】列表 */
|
|
/** 查询【请填写功能名称】列表 */
|
|
|
getList() {
|
|
getList() {
|
|
@@ -228,7 +260,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 取消按钮
|
|
// 取消按钮
|
|
|
cancel() {
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
|
|
|
|
+ this.spvisible = false;
|
|
|
this.reset();
|
|
this.reset();
|
|
|
},
|
|
},
|
|
|
// 表单重置
|
|
// 表单重置
|
|
@@ -261,11 +293,39 @@ export default {
|
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ tblselect(selection, row){
|
|
|
|
|
+ if(row.isMerge!=='-1'){
|
|
|
|
|
+ this.$refs.listtbl.toggleRowSelection(row,false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
|
|
|
+ selection.map(item => {
|
|
|
|
|
+ if(item.isMerge!=='-1'){
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
this.ids = selection.map(item => item.id)
|
|
this.ids = selection.map(item => item.id)
|
|
|
this.single = selection.length!==1
|
|
this.single = selection.length!==1
|
|
|
- this.multiple = !selection.length
|
|
|
|
|
|
|
+ this.multiple = !selection.length;
|
|
|
|
|
+ },
|
|
|
|
|
+ tableRowClassName({row, rowIndex}){
|
|
|
|
|
+ if(row.cids!=null){
|
|
|
|
|
+ return row["css"]?row["css"]:"ct1";
|
|
|
|
|
+ }
|
|
|
|
|
+ if(row.isMerge!='-1'){
|
|
|
|
|
+ return "child5";
|
|
|
|
|
+ }
|
|
|
|
|
+ return '';
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
handleAdd() {
|
|
@@ -276,44 +336,271 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
|
row.routerName = '修改'
|
|
row.routerName = '修改'
|
|
|
- this.$router.push({path: '/addReport',query:row})
|
|
|
|
|
|
|
+ localStorage.setItem("currentreport",JSON.stringify(row));
|
|
|
|
|
+ this.$router.push({path: '/addReport'})
|
|
|
|
|
+ },
|
|
|
|
|
+ handleDetail(row){
|
|
|
|
|
+ row.routerName = '详情'
|
|
|
|
|
+ localStorage.setItem("currentreport",JSON.stringify(row));
|
|
|
|
|
+ this.$router.push({path: '/addReport'})
|
|
|
},
|
|
},
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- if (this.form.id != null) {
|
|
|
|
|
- updateReport(this.form).then(response => {
|
|
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
|
|
- this.open = false;
|
|
|
|
|
- this.getList();
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- addReport(this.form).then(response => {
|
|
|
|
|
- this.$modal.msgSuccess("新增成功");
|
|
|
|
|
- this.open = false;
|
|
|
|
|
- this.getList();
|
|
|
|
|
|
|
+ if (this.spform.reportid != null) {
|
|
|
|
|
+ var ext1 = JSON.parse(this.spform.ext1==undefined?"[]":this.spform.ext1) ?? [];
|
|
|
|
|
+ var timedate = moment().format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ ext1.push({"content": `审批结果:${this.spform.status==="1"?'同意':'不同意'} 意见:${this.spform.msg}`, "deptname": this.$store.state.user.dept.deptName, "timestamp": timedate})
|
|
|
|
|
+ ext1 = JSON.stringify(ext1);
|
|
|
|
|
+ updateReport({id:this.spform.reportid,ext1:ext1}).then((response) => {
|
|
|
|
|
+ this.$modal.msgSuccess("成功");
|
|
|
|
|
+ this.$router.push({ path: "/report" });
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.spvisible = false;
|
|
|
},
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
|
|
|
+ this.$modal.confirm('是否确认删除编号为"' + ids + '"的数据项?').then(function() {
|
|
|
return delReport(ids);
|
|
return delReport(ids);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ handleSP(row){
|
|
|
|
|
+ this.spvisible = true;
|
|
|
|
|
+ this.spform.reportid = row.id;
|
|
|
|
|
+ this.spform.ext1 = row.ext1;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
this.download('system/report/export', {
|
|
this.download('system/report/export', {
|
|
|
...this.queryParams
|
|
...this.queryParams
|
|
|
}, `report_${new Date().getTime()}.xlsx`)
|
|
}, `report_${new Date().getTime()}.xlsx`)
|
|
|
|
|
+ },
|
|
|
|
|
+ selectable(row, index){
|
|
|
|
|
+ return (row.isMerge+"") === "-1";
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ handlemerge(){
|
|
|
|
|
+ const ids = this.ids;
|
|
|
|
|
+ if(ids.length>0){
|
|
|
|
|
+ mergeQuery(ids).then(res=>{
|
|
|
|
|
+ var msg = "<span>有施工报备可以合并!</span><br/> ";
|
|
|
|
|
+ var mapc = {};
|
|
|
|
|
+ var hasc = false;
|
|
|
|
|
+ for (const index in this.reportList) {
|
|
|
|
|
+ var c = this.reportList[index];
|
|
|
|
|
+ mapc[c.id] = c;
|
|
|
|
|
+ var p= res.data.find(item=>{return item.id+"" === c.id+"" });
|
|
|
|
|
+ if(p && p.cids){
|
|
|
|
|
+ c.cids = p.cids;
|
|
|
|
|
+ c["css"] = 'ct5';
|
|
|
|
|
+ hasc = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ for(const index in this.reportList){
|
|
|
|
|
+ var c = this.reportList[index];
|
|
|
|
|
+ if(c.cids ){
|
|
|
|
|
+ msg+=`施工报备单编号${c.id} 与 ${c.cids.split(",").map(i=>'施工报备单编号'+i).join("或")} 可以合并 <br/>`;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ msg+="<span style='color:#ffba00'>原因:施工结束时间相隔不超过1小时(包含1小时)、同方向、同车道(都在同一车道,或者1、2车道;3、4(应急车道)车道则为同车道),同桩号(指有包含关系或相同且修的全长在2.5公里范围内)判断为合并。</span>";
|
|
|
|
|
+ if(hasc) {
|
|
|
|
|
+ this.$confirm(msg, '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$confirm('未检测到可以合并的报备', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // this.$refs.listtbl.doLayout();
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$modal.msgWarning("未选择施工报备");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ mergeReport(){
|
|
|
|
|
+ const ids = this.ids;
|
|
|
|
|
+ if(ids.length>1){
|
|
|
|
|
+ mergeReport(ids).then(res=>{
|
|
|
|
|
+ //获取合集id
|
|
|
|
|
+ var sysreport = res.data["p"];
|
|
|
|
|
+ if(sysreport){
|
|
|
|
|
+ var listc = res.data["childlist"];
|
|
|
|
|
+ sysreport.dept= listc.map(i=>i.dept).join(",");
|
|
|
|
|
+ sysreport.planId= listc[0].planId;
|
|
|
|
|
+ sysreport.direction= listc[0].direction;
|
|
|
|
|
+ sysreport.section= listc[0].section;
|
|
|
|
|
+ sysreport.contentOne= '5';
|
|
|
|
|
+ sysreport.contentTwo= '9';
|
|
|
|
|
+ sysreport.lane= listc.map(i=>i.lane).join(",").split(",").filter(function(value,index,self){
|
|
|
|
|
+ return self.indexOf(value) === index;
|
|
|
|
|
+ }).join(",");
|
|
|
|
|
+ sysreport.manageUser= listc.map(i=>i.manageUser).join(",");
|
|
|
|
|
+ sysreport.managePhone= listc.map(i=>i.managePhone).join(",");
|
|
|
|
|
+ sysreport.saveUser= listc.map(i=>i.saveUser).join(",");
|
|
|
|
|
+ sysreport.savePhone= listc.map(i=>i.savePhone).join(",");
|
|
|
|
|
+ sysreport.status = '2';
|
|
|
|
|
+ sysreport.createBy = 'sys';
|
|
|
|
|
+ sysreport.startKm = listc.sort((a, b) => parseInt(b.startKm) - parseInt(a.startKm)).slice().pop().startKm;
|
|
|
|
|
+ sysreport.startHectometer = listc.sort((a, b) => parseInt(b.startKm) - parseInt(a.startKm)).slice().pop().startHectometer;
|
|
|
|
|
+ sysreport.endKm = listc.sort((a, b) => parseInt(a.endKm) - parseInt(b.endKm)).slice().pop().endKm;
|
|
|
|
|
+ sysreport.endHectometer = listc.sort((a, b) => parseInt(a.endKm) - parseInt(b.endKm)).slice().pop().endHectometer;
|
|
|
|
|
+ sysreport.startTime = listc.sort((a, b) => moment(b.startTime).unix() - moment(a.startTime).unix()).slice().pop().startTime;
|
|
|
|
|
+ sysreport.endTime = listc.sort((a, b) => moment(a.endTime).unix() - moment(b.endTime).unix()).slice().pop().endTime;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ sysreport.contentDes = listc.map((i,index)=>{
|
|
|
|
|
+ var section = i.section;
|
|
|
|
|
+ var cone = this.dict.type.content_one.filter(p=>{ return p.value==i.contentOne}).map(p=>p.label).join("");
|
|
|
|
|
+ var ctwo = this.dict.type.content_two.filter(p=>{ return p.value==i.contentTwo}).map(p=>p.label).join("");
|
|
|
|
|
+ var time = i.startTime + '~' + i.endTime;
|
|
|
|
|
+ var lan = i.lane;
|
|
|
|
|
+ var addr = `K${i.startKm?i.startKm:"0" }+${i.startHectometer?i.startHectometer:"0" } ~ K${i.endKm?i.endKm:"0" }+${i.endHectometer?i.endHectometer:"0"}`;
|
|
|
|
|
+ return `${index+1}、${section}${addr}${cone}${ctwo}${i.contentDes ?? ""} 占用第${lan}车道(${time}) \r\n 负责人:${i.manageUser + " "+i.managePhone} \r\n 安全员:${i.saveUser + " "+i.savePhone}` }).join("\r\n\r\n");
|
|
|
|
|
+ updateReport(sysreport).then(res=>{
|
|
|
|
|
+ this.handleQuery();
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$modal.msgWarning("合并错误!");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$modal.msgWarning("请选择2条以上的施工报备");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ handlect(){
|
|
|
|
|
+ const ids = this.ids;
|
|
|
|
|
+ if(ids.length>0){
|
|
|
|
|
+ collisionDetection(ids).then(res=>{
|
|
|
|
|
+ var msg = "<span>有施工报备存在冲突!</span><br/> ";
|
|
|
|
|
+ var mapc = {};
|
|
|
|
|
+ var hasc = false;
|
|
|
|
|
+ for (const index in this.reportList) {
|
|
|
|
|
+ var c = this.reportList[index];
|
|
|
|
|
+ mapc[c.id] = c;
|
|
|
|
|
+ var p= res.data.find(item=>{return item.id+"" === c.id+"" });
|
|
|
|
|
+ if(p && p.cids){
|
|
|
|
|
+ c.cids = p.cids;
|
|
|
|
|
+ c["css"] = 'ct1';
|
|
|
|
|
+ hasc = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ for(const index in this.reportList){
|
|
|
|
|
+ var c = this.reportList[index];
|
|
|
|
|
+ if(c.cids ){
|
|
|
|
|
+ msg+=`施工报备单编号${c.id} 与 ${c.cids.split(",").map(i=>'施工报备单编号'+i).join("、")} 冲突 <br/>`;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ msg+="<span style='color:#ffba00'>原因:同时间指时间重合超过1小时(不包含1小时)、同方向、间距小于5公里(不包含5公里)。</span>";
|
|
|
|
|
+ if(hasc) {
|
|
|
|
|
+ this.$confirm(msg, '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$confirm('未检测到冲突', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // this.$refs.listtbl.doLayout();
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$modal.msgWarning("未选择施工报备");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style>
|
|
|
|
|
+.ct1{
|
|
|
|
|
+ background: #fce8e8 !important;
|
|
|
|
|
+}
|
|
|
|
|
+.ct2{
|
|
|
|
|
+ background: #77FFB7 !important;
|
|
|
|
|
+}
|
|
|
|
|
+.ct3{
|
|
|
|
|
+ background: #FFFD77ED !important;
|
|
|
|
|
+}
|
|
|
|
|
+.ct4{
|
|
|
|
|
+ background: #c5c5fd !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.ct5{
|
|
|
|
|
+ background: #c5e8fd !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+.child5{
|
|
|
|
|
+ background: #efefef !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.el-table [class*=el-table__row--level] .el-table__expand-icon{
|
|
|
|
|
+ margin-left:-100px;
|
|
|
|
|
+ width: 94px;
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.el-table-column--selection .cell{
|
|
|
|
|
+ text-overflow:unset
|
|
|
|
|
+}
|
|
|
|
|
+.small-padding .cell{
|
|
|
|
|
+ padding-left: 0;
|
|
|
|
|
+ padding-right: 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+</style>
|
|
|
|
|
+
|