| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- <template>
- <el-container>
- <el-main style="position: relative">
- <el-tabs v-model="activeName" @tab-click="handleClick" class="tabs_wrapper">
- <el-tab-pane v-for="(item,index) in tabList" :key="index" :label="item.label" :name="item.type" :lazy="true">
- <el-form :inline="true" size="mini" label-width="84px" class="demo-form-inline report_filter_select">
- <el-form-item label="选择年度">
- <el-select v-model="addForm.year" @change="changeYear" style="width: 120px;">
- <el-option :label="item.pnm" :value="item.pnm" :key="index" v-for="(item,index) in yearList"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="选择批次">
- <el-select v-model="addForm.batch" @change="changeBatch" style="width: 120px;">
- <el-option :label="item.pnm" :value="item.pnm" :key="index" v-for="(item,index) in pcList"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="督查组">
- <el-select v-model="addForm.group" @change="changeGroup" style="width: 120px;">
- <el-option :label="item.pnm" :value="item.id" :key="index" v-for="(item,index) in groupList"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="区/县">
- <el-select v-model="addForm.area" @change="changeArea" clearable style="width: 120px;">
- <el-option :label="item.pnm" :value="item.adCode" :key="index" v-for="(item,index) in areaList"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="项目名称">
- <el-select v-model="addForm.rgstrId" @change="changeProject" clearable placeholder="请选择" style="width: 120px;">
- <el-option
- v-for="item in projectList"
- :key="item.id"
- :label="item.pnm"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="专业">
- <el-select v-model="addForm.pblmChType" placeholder="请选择" clearable style="width: 120px;">
- <el-option
- v-for="item in professionList"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <component :is="item.value" :currentNodeId="addForm.rgstrId" :objId="objId" :type="addForm.pblmChType" :groupId="addForm.group" :areaId="addForm.area" :flag="flag" :backStatus="backStatus" :isEdit="editable" @sendSubmitStatus="sendSubmitStatus"></component>
- </el-tab-pane>
- </el-tabs>
- <div class="report_btn_group">
- <!-- <el-button type="success">生成阶段稿</el-button> -->
- <el-button v-if="flag == '4' && editable" type="warning" @click="backProfession">驳回</el-button>
- <el-button v-if="flag != '7' && editable" type="success" @click="stageSubmit">{{curStage}}</el-button>
- <el-button v-if="flag == '4'" type="primary" @click="showDailyRecord">日志</el-button>
- </div>
- <el-dialog
- title="操作日志"
- :visible.sync="dailyRecordVisible"
- width="80%">
- <daily-record :rgstrId="addForm.rgstrId" :professionType="addForm.pblmChType"></daily-record>
- </el-dialog>
- </el-main>
- </el-container>
- </template>
- <script>
- import changeAdvice from './resultDiscuss'
- import resultDiscuss from './resultDiscuss'
- import centerModify from './resultDiscuss'
- import bureauModify from './resultDiscuss'
- import dailyRecord from '../dialogCom/dailyRecord';
- import request from "@util/gw_ajax_request"
- import {backProfessionApi} from "@api/InspectionReport.js";
- export default {
- data(){
- return{
- activeName: '4',
- tabList:[
- {label: '交换意见阶段',value: 'changeAdvice',type: '4'},
- {label: '成果讨论阶段',value: 'resultDiscuss',type: '5'},
- {label: '中心修改阶段',value: 'centerModify',type: '6'},
- {label: '司局修改阶段',value: 'bureauModify',type: '7'}
- ],
- curStage: '提交到成果讨论阶段',
- addForm:{
- year: '',
- batch: '',
- group: '',
- area: '',
- rgstrId: '',
- pblmChType: "",
- persId : localStorage.getItem("userid")
- },
- yearList:[],
- pcList: [],
- groupList: [],
- areaList: [],
- projectList: [],
- professionList:[
- {label: '前期与设计',value: '1'},
- {label: '建设管理',value: '2'},
- {label: '计划下达与执行',value: '3'},
- {label: '资金使用与管理',value: '4'},
- {label: '工程质量',value: '5'},
- {label: '工程安全',value: '6'}
- ],
- flag: '4',
- objId: '',
- editable: true,
- backStatus: false, //回退状态
- dailyRecordVisible: false, //操作日志弹窗
- }
- },
- components:{
- changeAdvice,
- resultDiscuss,
- centerModify,
- bureauModify,
- dailyRecord
- },
- //监听属性 类似于data概念
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- hasPriv(){
- return this.ownPriv('manage')
- }
- },
- mounted(){
- this.$nextTick(()=>{
- this.getTreeData();
- })
- },
- methods:{
- async getYearPc(){
- await request.post(`/tac/insp/year/list`,{}).then(res =>{
- if(res.success){
- this.$nextTick(() =>{
- this.yearList = res.data;
- })
- }
- })
- request.post(`/tac/insp/batch/list`,{}).then(res =>{
- if(res.success){
- this.pcList = res.data;
- }
- })
- },
- //获取左侧树数据
- getTreeData(){
- let _self = this;
- request.post(`/tac/insp/year/batch/obj/getObjTreeListV2`,{
- "persId": _self.persId
- }).then(res =>{
- let treeDataLists
- treeDataLists = res.data.children;
- this.yearList = treeDataLists;
- this.pcList = this.yearList[0].children;
- this.groupList = this.pcList[0].children;
- this.areaList = this.groupList[0].children;
- this.projectList = this.areaList[0].children;
- // 赋予默认值
- this.addForm.year = this.yearList[0].pnm
- this.addForm.batch = this.pcList[0].pnm
- this.addForm.group = this.groupList[0].id
- this.addForm.area = this.areaList[0].adCode
- this.addForm.rgstrId = this.projectList[0].id
- this.objId = this.projectList[0].objId
- })
- },
- changeYear(val){
- this.addForm.batch = ''
- this.addForm.rgstrId = ''
- this.addForm.group = ''
- this.addForm.area = ''
- this.yearList.forEach(ele=>{
- if(val == ele.pnm){
- this.pcList = ele.children
- }
- })
- },
- changeBatch(val){
- this.addForm.rgstrId = ''
- this.addForm.group = ''
- this.addForm.area = ''
- this.pcList.forEach(ele=>{
- if(val == ele.pnm){
- this.groupList = ele.children
- this.addForm.group = this.groupList[0].id
- this.areaList = this.groupList[0].children
- this.addForm.area = this.areaList[0].adCode
- this.projectList = this.areaList[0].children
- this.addForm.rgstrId = this.projectList[0].id
- }
- })
- },
- changeGroup(val){
- this.addForm.area = ''
- this.addForm.rgstrId = ''
- this.groupList.forEach(ele=>{
- if(val == ele.id){
- this.areaList = ele.children
- }
- })
- },
- changeArea(val){
- this.addForm.rgstrId = ''
- this.areaList.forEach(ele=>{
- if(val == ele.adCode){
- this.projectList = ele.children
- }
- })
- },
- changeProject(val){
- this.projectList.forEach(ele=>{
- if(val == ele.id){
- this.objId = ele.objId
- }
- })
- },
- handleClick(data){
- console.log(data)
- this.flag = data.name
- if(this.flag == '4'){
- this.curStage = 'n'
- }else if(this.flag == '5'){
- this.curStage = '提交到中心修改阶段'
- }else if(this.flag == '6'){
- this.curStage = '提交到司局修改阶段'
- }else if(this.flag == '7'){
- this.curStage = '提交'
- }
- },
- stageSubmit(){
- if(this.addForm.rgstrId){
- let url
- if(this.flag == '7'){
- url = `/tac/pawp/rgstr/siju/${this.addForm.rgstrId}/8`
- }else{
- url = `/tac/pawp/rgstr/chengguo/submit/${this.addForm.rgstrId}/${Number(this.flag) + 1}`
- }
- this.$confirm(`注意:提交后将不能更改!确定内容已修改完成,并将成果“${this.curStage}”吗?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.get(url).then(res=>{
- if(res.success){
- this.editable = false
- this.$message.success('提交成功')
- }else{
- this.$message.error(res.message)
- }
- })
- }).catch(() => {
- });
- }else{
- this.$message.warning("项目名称不能为空");
- }
- },
- // 助理退回工作底稿
- backProfession(){
- if(!this.addForm.pblmChType){
- this.$message.warning('请选择专业')
- return
- }
- if(this.addForm.pblmChType && this.addForm.rgstrId){
- backProfessionApi(this.addForm.rgstrId,this.addForm.pblmChType).then(res=>{
- if(res.success){
- this.backStatus = true
- this.$message.success('回退成功')
- }else{
- this.$message.warning(res.message)
- }
- }).catch(err=>{
- this.$message.success(err)
- })
- }else{
- this.$message.warning("项目名称和专业不能为空");
- }
- },
- sendSubmitStatus(val){
- this.editable = val
- },
- // 展示操作日志
- showDailyRecord(){
- if(!this.addForm.pblmChType){
- this.$message.warning('请选择专业')
- return
- }
- this.dailyRecordVisible = true
- },
- }
- }
- </script>
- <style lang="scss">
- .tabs_wrapper .el-tabs__item,.report_filter_select .el-form-item__label{
- font-size: 16px;
- color: #333;
- }
- .report_btn_group{
- position: absolute;
- top: 20px;
- right: 10px;
- }
- </style>
|