|
|
|
|
@ -34,12 +34,13 @@
|
|
|
|
|
>
|
|
|
|
|
查询
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button class="filter-item" style="margin-left: 10px" type="primary" @click="handleCreate">
|
|
|
|
|
新增
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button class="filter-item" style="margin-left: 10px" type="primary" @click="handleExport">
|
|
|
|
|
导出
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button class="filter-item" style="margin-left: 10px" type="primary" @click="dialogVisible = true">
|
|
|
|
|
监控
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
@ -57,23 +58,23 @@
|
|
|
|
|
<span>{{ (listQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="班组名称" align="center" prop="teamName" />
|
|
|
|
|
<el-table-column label="班组长" align="center" prop="teamLeader" />
|
|
|
|
|
<el-table-column label="班组长手机号" align="center" prop="teamLeaderPhone" />
|
|
|
|
|
<el-table-column label="评价日期" align="center" prop="evalTime" />
|
|
|
|
|
<el-table-column label="评价人" align="center" prop="evaluator" />
|
|
|
|
|
<el-table-column label="评价星级" align="center" prop="score">
|
|
|
|
|
<el-table-column label="班组长" align="center" prop="workManager" />
|
|
|
|
|
<el-table-column label="工作内容" align="center" prop="workContent" />
|
|
|
|
|
<el-table-column label="风险等级" align="center" prop="riskLevel" />
|
|
|
|
|
<el-table-column label="序号" align="center">
|
|
|
|
|
<template slot-scope="{ row }">
|
|
|
|
|
<el-rate :value="row.score" disabled :max="5" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="评价内容" align="center" prop="content" />
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
|
|
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
|
|
<el-button type="text" size="mini" @click="handleUpdate(row, $index)">编辑</el-button>
|
|
|
|
|
<el-button type="text" size="mini" @click="handleDelete(row, $index)">删除</el-button>
|
|
|
|
|
<el-button type="text" size="mini" @click="handleWatch(row)">查看</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="建管单位" align="center" prop="org" />
|
|
|
|
|
<el-table-column label="标段工程名称" align="center" prop="bidName" />
|
|
|
|
|
<el-table-column label="工程编码" align="center" prop="proCode" />
|
|
|
|
|
<el-table-column label="标段编码" align="center" prop="bidCode" />
|
|
|
|
|
<el-table-column label="监理单位" align="center" prop="jldw" />
|
|
|
|
|
<el-table-column label="施工单位" align="center" prop="sgdw" />
|
|
|
|
|
<el-table-column label="施工状态" align="center" prop="sgStatus" />
|
|
|
|
|
<el-table-column label="监察人" align="center" prop="checkUserName" />
|
|
|
|
|
<el-table-column label="作业票号" align="center" prop="ticketNo" />
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
@ -83,41 +84,7 @@
|
|
|
|
|
:limit.sync="listQuery.pageSize"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="630px" @closed="handleClosedModal">
|
|
|
|
|
<el-form
|
|
|
|
|
ref="dataForm"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
:model="temp"
|
|
|
|
|
label-position="right"
|
|
|
|
|
label-width="120px"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="班组:" prop="teamId">
|
|
|
|
|
<el-select v-model="temp.teamId" placeholder="班组" style="width: 100%" @change="handleChooseTeam">
|
|
|
|
|
<el-option v-for="item in teamList" :key="item.id" :value="item.id" :label="item.name" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="班组长:" prop="teamLeader">
|
|
|
|
|
<el-input v-model="temp.teamLeader" placeholder="班组长" :maxlength="50" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="班组长手机号:" prop="teamLeaderPhone">
|
|
|
|
|
<el-input v-model="temp.teamLeaderPhone" placeholder="班组长手机号" :maxlength="50" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="评价星级:" prop="score" :max="5">
|
|
|
|
|
<!-- <el-input v-model="temp.score" placeholder="评价星级" :maxlength="50" />-->
|
|
|
|
|
<el-rate v-model="temp.score" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="评级内容:" prop="content">
|
|
|
|
|
<el-input v-model="temp.content" placeholder="评级内容" :maxlength="50" type="textarea" :rows="2" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogFormVisible = false"> 关闭 </el-button>
|
|
|
|
|
<el-button type="primary" @click="dialogStatus === 'create' ? createData() : updateData()">
|
|
|
|
|
提交
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<RemoteWatchModal :component-visible.sync="dialogVisible" :current-id="currentId" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -126,15 +93,11 @@ import waves from '@/directive/waves'
|
|
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
|
|
|
|
|
|
|
import _ from 'lodash/fp'
|
|
|
|
|
import {
|
|
|
|
|
addQualityItem,
|
|
|
|
|
deleteQualityItem,
|
|
|
|
|
getQualityItemDetail,
|
|
|
|
|
updateQualityItem
|
|
|
|
|
} from '@/api/basic/quality'
|
|
|
|
|
import BuildSelect from '@/views/basic/project/components/BuildSelect.vue'
|
|
|
|
|
import { getDailyTaskList } from '@/api/risk/dailyTask'
|
|
|
|
|
import { exportDailyTask, getDailyTaskList } from '@/api/risk/dailyTask'
|
|
|
|
|
import RiskLevelSelect from '@/views/risk/dailyTask/components/RiskLevelSelect.vue'
|
|
|
|
|
import { downloadFile } from '@/utils/download'
|
|
|
|
|
import RemoteWatchModal from '@/views/risk/dailyTask/components/RemoteWatchModal.vue'
|
|
|
|
|
|
|
|
|
|
const defaultTmp = {
|
|
|
|
|
teamId: '',
|
|
|
|
|
@ -147,13 +110,12 @@ const defaultTmp = {
|
|
|
|
|
content: ''
|
|
|
|
|
}
|
|
|
|
|
export default {
|
|
|
|
|
components: { RiskLevelSelect, BuildSelect, Pagination },
|
|
|
|
|
components: { RemoteWatchModal, RiskLevelSelect, BuildSelect, Pagination },
|
|
|
|
|
directives: { waves },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
tableKey: 0,
|
|
|
|
|
list: [],
|
|
|
|
|
teamList: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
listLoading: false,
|
|
|
|
|
listQuery: {
|
|
|
|
|
@ -166,39 +128,17 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
tableHeight: 650,
|
|
|
|
|
temp: _.cloneDeep(defaultTmp),
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
dialogStatus: '',
|
|
|
|
|
downloadLoading: false,
|
|
|
|
|
textMap: {
|
|
|
|
|
update: '编辑',
|
|
|
|
|
create: '新增'
|
|
|
|
|
},
|
|
|
|
|
dialogPvVisible: false,
|
|
|
|
|
rules: {
|
|
|
|
|
teamId: [{ required: true, message: '不能为空', trigger: 'change' }],
|
|
|
|
|
teamName: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
|
|
|
teamLeader: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
|
|
|
teamLeaderPhone: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
|
|
|
score: [{ required: true, message: '不能为空', trigger: 'change' }],
|
|
|
|
|
content: [{ required: true, message: '不能为空', trigger: 'blur' }]
|
|
|
|
|
}
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
currentId: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleChooseTeam(val) {
|
|
|
|
|
const currentTeam = this.teamList.find(item => item.id === val)
|
|
|
|
|
this.temp.teamName = currentTeam.name
|
|
|
|
|
this.temp.teamLeader = currentTeam.teamLeader
|
|
|
|
|
this.temp.teamLeaderPhone = currentTeam.teamLeaderPhone
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
this.listLoading = true
|
|
|
|
|
|
|
|
|
|
this.listQuery.time = (this.listQuery.time?.length) ? this.listQuery.time?.join(' - ') : ''
|
|
|
|
|
|
|
|
|
|
this.listQuery.wordDay = (this.listQuery.wordDay?.length) ? this.listQuery.wordDay?.join(' - ') : ''
|
|
|
|
|
getDailyTaskList(this.listQuery).then((response) => {
|
|
|
|
|
this.list = response.rows.map(item => {
|
|
|
|
|
return item
|
|
|
|
|
@ -213,87 +153,16 @@ export default {
|
|
|
|
|
this.listQuery.pageNum = 1
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
// 新增
|
|
|
|
|
handleCreate() {
|
|
|
|
|
this.dialogStatus = 'create'
|
|
|
|
|
this.dialogFormVisible = true
|
|
|
|
|
},
|
|
|
|
|
// 导出
|
|
|
|
|
handleExport() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
createData() {
|
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
addQualityItem(this.temp).then((response) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: response.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
this.getList()
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
this.dialogFormVisible = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
exportDailyTask().then(res => {
|
|
|
|
|
downloadFile({ fileName: '日计划详情.xlsx', fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 编辑
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
getQualityItemDetail({ evalId: row.evalId }).then((res) => {
|
|
|
|
|
const { score } = res.data
|
|
|
|
|
this.temp = Object.assign({}, res.data)
|
|
|
|
|
this.temp.score = Number(score)
|
|
|
|
|
if (this.temp.score > 5) this.temp.score = 5
|
|
|
|
|
this.temp.teamId = row.teamId
|
|
|
|
|
})
|
|
|
|
|
this.dialogStatus = 'update'
|
|
|
|
|
this.dialogFormVisible = true
|
|
|
|
|
},
|
|
|
|
|
updateData() {
|
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
updateQualityItem(this.temp).then((response) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: response.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
this.getList()
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
this.dialogFormVisible = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 删除数据
|
|
|
|
|
handleDelete(row, index) {
|
|
|
|
|
this.$confirm(`确定要删除该数据吗?`, {
|
|
|
|
|
type: 'warning',
|
|
|
|
|
title: '操作提示',
|
|
|
|
|
beforeClose: async(action, instance, done) => {
|
|
|
|
|
if (action === 'confirm') {
|
|
|
|
|
deleteQualityItem({ evalId: row.evalId }).then((response) => {
|
|
|
|
|
done()
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: response.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
this.getList()
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
done()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleClosedModal() {
|
|
|
|
|
this.$refs['dataForm'].resetFields()
|
|
|
|
|
this.temp = _.cloneDeep(defaultTmp)
|
|
|
|
|
// 查看监控
|
|
|
|
|
handleWatch(row) {
|
|
|
|
|
this.currentId = row.classId
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|