|
|
@@ -4,6 +4,7 @@
|
|
|
<el-form-item label="时间" prop="timeRanage">
|
|
|
<el-date-picker
|
|
|
v-model="queryParams.timeRanage"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
type="daterange"
|
|
|
range-separator="至"
|
|
|
start-placeholder="开始日期"
|
|
|
@@ -30,7 +31,7 @@
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
- <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 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" @row-click="tableclick">
|
|
|
<el-table-column type="selection" width="40" align="center" @selectable="selectable"/>
|
|
|
<!-- <el-table-column-->
|
|
|
<!-- type="index"-->
|
|
|
@@ -104,7 +105,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
- @click="handleDetail(scope.row)"
|
|
|
+ @click.stop="handleDetail(scope.row)"
|
|
|
|
|
|
>查看</el-button>
|
|
|
<el-button
|
|
|
@@ -112,7 +113,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
v-if="scope.row.status==='1'||scope.row.status==='4'"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
+ @click.stop="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['system:report:edit']"
|
|
|
>修改</el-button>
|
|
|
<el-button
|
|
|
@@ -120,7 +121,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
v-if="scope.row.status==='1'||scope.row.status==='4'"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
+ @click.stop="handleDelete(scope.row)"
|
|
|
v-hasPermi="['system:report:remove']"
|
|
|
>删除</el-button>
|
|
|
|
|
|
@@ -130,7 +131,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
v-if="scope.row.status==='2' && scope.row.auditDept+'' === currentuserdeptid+''"
|
|
|
- @click="handleSP(scope.row)"
|
|
|
+ @click.stop="handleSP(scope.row)"
|
|
|
v-hasPermi="['system:report:sp']"
|
|
|
|
|
|
>审批</el-button>
|
|
|
@@ -153,15 +154,19 @@
|
|
|
|
|
|
|
|
|
<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-form ref="form" :model="spform" label-width="150px">
|
|
|
+ <el-form-item label="审批意见" >
|
|
|
<el-input v-model="spform.msg" type="textarea" placeholder="请输入审批意见" />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="" >
|
|
|
+
|
|
|
+ <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 label="下级审批部门" v-if="spform.status=='1' && nexdept" >
|
|
|
+ <el-radio :value="nexdept" :label="nexdept+''">{{ alldept.filter(i=>{ return i.deptId == nexdept}).length>0?alldept.filter(i=>{ return i.deptId == nexdept})[0].deptName:"" }}</el-radio>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -177,6 +182,16 @@
|
|
|
<script>
|
|
|
import { listReport, getReport, delReport, addReport, updateReport,collisionDetection,mergeQuery,mergeReport } from "@/api/system/report";
|
|
|
import moment from "moment";
|
|
|
+import {
|
|
|
+ listConfig,
|
|
|
+ getConfig,
|
|
|
+ delConfig,
|
|
|
+ addConfig,
|
|
|
+ updateConfig,
|
|
|
+ refreshCache,
|
|
|
+ getConfigKey
|
|
|
+} from "@/api/system/config";
|
|
|
+import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
|
|
|
|
|
|
export default {
|
|
|
name: "Report",
|
|
|
@@ -229,7 +244,10 @@ export default {
|
|
|
reportid:0,
|
|
|
msg:"",
|
|
|
ext1:"",
|
|
|
- }
|
|
|
+ },
|
|
|
+ nexdept:null,
|
|
|
+ alldept:[],
|
|
|
+ spl:[],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -245,6 +263,25 @@ export default {
|
|
|
this.$parent.divSelect =2;
|
|
|
this.$parent.activeIndex='1';
|
|
|
|
|
|
+ listDept({}).then(res=>{
|
|
|
+ this.alldept = res.data;
|
|
|
+ });
|
|
|
+ getConfigKey("spflow").then(res=>{
|
|
|
+ res = JSON.parse(res.msg);
|
|
|
+ this.spl = res;
|
|
|
+ for (var index in this.spl) {
|
|
|
+ var tempc = this.spl[index];
|
|
|
+ var indexc = tempc.findIndex((i)=>i.deptId == this.currentuserdeptid);
|
|
|
+ if(indexc!=-1){
|
|
|
+ console.log(this.currentuserdeptid)
|
|
|
+ this.nexdept = indexc+1 == tempc.length?null:tempc[indexc+1];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
},
|
|
|
@@ -256,7 +293,7 @@ export default {
|
|
|
/** 查询【请填写功能名称】列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listReport(this.queryParams).then(response => {
|
|
|
+ listReport(this.addDateRange(this.queryParams, this.queryParams.timeRanage)).then(response => {
|
|
|
this.reportList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
@@ -358,6 +395,7 @@ export default {
|
|
|
updateReport({id:this.spform.reportid,ext1:ext1}).then((response) => {
|
|
|
this.$modal.msgSuccess("成功");
|
|
|
this.$router.push({ path: "/report" });
|
|
|
+ this.handleQuery();
|
|
|
});
|
|
|
|
|
|
|
|
|
@@ -374,6 +412,14 @@ export default {
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
+ tableclick(row, column, event){
|
|
|
+ if(row.isMerge!=-1){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ row.routerName = '详情'
|
|
|
+ localStorage.setItem("currentreport",JSON.stringify(row));
|
|
|
+ this.$router.push({path: '/addReport'})
|
|
|
+ },
|
|
|
|
|
|
handleSP(row){
|
|
|
this.spvisible = true;
|