|
@@ -0,0 +1,353 @@
|
|
|
+<template>
|
|
|
+ <div class="pageContentDiv" style="width: 100%; height: 88vh; padding: 8px 8px 0px 8px">
|
|
|
+ <el-row class="searchDiv" ref="searchDiv">
|
|
|
+ <searchCom :inConfig="searchComConfig" v-model="searchCom"></searchCom>
|
|
|
+ <el-button type="primary" size="small" @click="searchData">查询</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="searchData1">导出</el-button>
|
|
|
+ <addFlow v-model="flowShow2" :sureFlowAction="sureFlowAction"></addFlow>
|
|
|
+ </el-row>
|
|
|
+ <div :style="'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'">
|
|
|
+ <el-table :data="tableData" style="width: 100%;text-align: center;" stripe>
|
|
|
+ <el-table-column label="序号" type="index" width="50">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="工程名称" width="180" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="工程类型" width="180" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="申请安装地址" width="180" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="联系电话" width="180" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="工程登记" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="任务分配" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="现场勘察及预算" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="用户缴费" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="合同总价" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="工程派工" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="施工班组和人员" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="施工人员" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="综合验收" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="工程结算" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="结算办理" align="center">
|
|
|
+ <el-table-column prop="name" label="操作人" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作时间" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="应缴金额" width="120" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import searchCom from '@/components/projectCom/searchCom2/index.vue'
|
|
|
+import timeSelect from '@/components/projectCom/timeSelect/index.vue'
|
|
|
+import tableCom from '@/components/projectCom/tableUn/index.vue'
|
|
|
+import commonMe from '@/utils/common.js'
|
|
|
+import commonFlow from '@/utils/commonFlow.js'
|
|
|
+import { getDispatchCount, deleteFlow, dispatchCountExport } from '@/api/flowInfo'
|
|
|
+import inputForm from '@/components/projectCom/inputForm/index.vue'
|
|
|
+import addFlow from '@/views/zhpt/projectManager/newInstall/addFlow/index.vue'
|
|
|
+export default {
|
|
|
+ name: 'addProject',
|
|
|
+ components: {
|
|
|
+ timeSelect,
|
|
|
+ // selectList,
|
|
|
+ tableCom,
|
|
|
+ searchCom,
|
|
|
+ inputForm,
|
|
|
+ addFlow
|
|
|
+ },
|
|
|
+ props: { data: Object },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ searchComConfig: {
|
|
|
+ showTime: true,
|
|
|
+ // showDataConfig: true,
|
|
|
+ // showState: true,
|
|
|
+ showUserType: true,
|
|
|
+ timeLabel: '发起时间'
|
|
|
+ },
|
|
|
+ size: 30,
|
|
|
+ current: 1,
|
|
|
+ sureFlowAction: null, //立即触发登记事件
|
|
|
+ pageShow: false,
|
|
|
+ processId: '',
|
|
|
+ rowHeight: 0, //查询栏的高度
|
|
|
+ config: {
|
|
|
+ mainFlow: 'register', //注册流程
|
|
|
+ subFlow: 'addProject', //当前是登记环节
|
|
|
+ isEdit: false, //操作还是编辑
|
|
|
+ data: null //操作行
|
|
|
+ },
|
|
|
+ title: '',
|
|
|
+ inputConfig: {
|
|
|
+ //输入的相关配置
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '登记类型', //显示标签
|
|
|
+ required: true, //是否必填,默认不必填
|
|
|
+ field: 'processId', //存储字段
|
|
|
+ type: 'select', //类型,不写入此参数则默认是text
|
|
|
+ label: '登记类型', //显示标签
|
|
|
+ config: {
|
|
|
+ //select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
|
|
|
+ multiple: false, //是否多选
|
|
|
+ data: [], //下拉数据
|
|
|
+ field: {
|
|
|
+ id: 'id', //id代表的字段
|
|
|
+ label: 'processName' //label的字段
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //查询组件的条件接收
|
|
|
+ searchCom: {},
|
|
|
+ currentSearch: {},
|
|
|
+ //查询条件(除开翻页以外的其它查询条件)
|
|
|
+ search: {},
|
|
|
+ flowShow: false, //输入页面显示控制
|
|
|
+ flowShow2: false, //登记页面的显示控制
|
|
|
+ tableInfo: {}, //table相关的一些信息,如当前选择的行数,当前双击的信息等
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted: function () {
|
|
|
+ this.getTableHeight()
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.config.subflowName = this.$options.name
|
|
|
+ this.sureFlowAction = this.$store.state.routeSetting.registerShow && true
|
|
|
+ this.$store.dispatch('routeSetting/registerShow', false)
|
|
|
+ },
|
|
|
+ destroyed() { },
|
|
|
+ watch: {
|
|
|
+ flowShow() {
|
|
|
+ if (!this.flowShow) {
|
|
|
+ this.searchData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ flowShow2() {
|
|
|
+ if (!this.flowShow2) {
|
|
|
+ this.searchData()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //查询按钮
|
|
|
+ searchData() {
|
|
|
+ this.$refs.tableCom.getTableDataByOne()
|
|
|
+ },
|
|
|
+
|
|
|
+ searchData1() {
|
|
|
+ const searchInfo = commonMe.notJsonCopy(Object.assign(this.searchCom, this.search))
|
|
|
+ const searchData = {
|
|
|
+ size: this.size,
|
|
|
+ current: this.current,
|
|
|
+ ...searchInfo
|
|
|
+ }
|
|
|
+ let type = 1
|
|
|
+ dispatchCountExport(searchData).then((res) => {
|
|
|
+ let fileName = '工程分派台账.xlsx'
|
|
|
+ const url = window.URL.createObjectURL(new Blob([res], { type }))
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.href = url
|
|
|
+ link.setAttribute('download', `${fileName}`)
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ window.URL.revokeObjectURL(url) // 释放内存
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * table翻页时触发,同时整合查询条件
|
|
|
+ * @param pageInfo 翻页的数据
|
|
|
+ */
|
|
|
+ tableChage(pageInfo) {
|
|
|
+ const searchInfo = commonMe.notJsonCopy(Object.assign(this.searchCom, this.search))
|
|
|
+ // searchInfo.label = this.$route.name
|
|
|
+ this.size = pageInfo.size
|
|
|
+ // this.current = pageInfo.current
|
|
|
+ const searchData = {
|
|
|
+ size: 10000,
|
|
|
+ current: 1,
|
|
|
+ ...searchInfo
|
|
|
+ }
|
|
|
+ // searchData.dto = {
|
|
|
+ // id: 4,
|
|
|
+ // map: searchInfo
|
|
|
+ // }
|
|
|
+ return this.getData(searchData)
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理查询获取的数据,然后返回给table进行渲染
|
|
|
+ * searchData 查询条件
|
|
|
+ */
|
|
|
+ getData(searchData) {
|
|
|
+ this.currentSearch = commonMe.shallowCopy(this.searchCom)
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ getDispatchCount(searchData)
|
|
|
+ .then((res) => {
|
|
|
+ let list = JSON.parse(JSON.stringify(res.data.records))
|
|
|
+ list.pop()
|
|
|
+ // console.log('pop', list)
|
|
|
+ resolve({
|
|
|
+ records: list || [],
|
|
|
+ total: res.data.total || 0
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch((res) => {
|
|
|
+ reject(res)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 流程删除
|
|
|
+ */
|
|
|
+ deleteFlow(e) {
|
|
|
+ let data = e
|
|
|
+ if (e && !(data instanceof Array)) {
|
|
|
+ data = [e]
|
|
|
+ }
|
|
|
+ this.$confirm('此操作将永久删除' + data.length + '条流程类型' + ', 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ const params = {
|
|
|
+ id: data
|
|
|
+ .map((e) => {
|
|
|
+ return e.processId
|
|
|
+ })
|
|
|
+ .join(',')
|
|
|
+ }
|
|
|
+ deleteFlow(params).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.searchData()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查看详情
|
|
|
+ */
|
|
|
+ lookInfo(data) {
|
|
|
+ this.title = '工程信息详情'
|
|
|
+ this.config.isEdit = false
|
|
|
+ this.config.data = data
|
|
|
+ this.flowShow = true
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理
|
|
|
+ */
|
|
|
+ handle(data) {
|
|
|
+ this.title = '工程信息处理'
|
|
|
+ this.config.isEdit = true
|
|
|
+ this.config.data = data
|
|
|
+ this.flowShow = true
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 选择类型
|
|
|
+ */
|
|
|
+ selectChange() {
|
|
|
+ this.pageShow = true
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 登记按钮
|
|
|
+ */
|
|
|
+ addData() {
|
|
|
+ this.pageShow = false
|
|
|
+ this.title = '工程信息登记'
|
|
|
+ this.config.isEdit = true
|
|
|
+ this.config.data = null
|
|
|
+ this.config.processId = this.processId
|
|
|
+ this.flowShow = true
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 计算table的高度
|
|
|
+ */
|
|
|
+ getTableHeight() {
|
|
|
+ this.rowHeight = this.$refs.searchDiv.$el.clientHeight
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang='scss' scoped>
|
|
|
+.pageContentDiv {
|
|
|
+ .searchDiv>* {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-button {
|
|
|
+ position: relative;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|