zhouhailu
2021-02-05 1f4960ae035bb0a64425a4a762c7cbf397b57427
第六步开始
4个文件已修改
1个文件已添加
383 ■■■■ 已修改文件
src/api/data.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/module/user.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/accessReport/accessReportList.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/accessReport/chooseAssess.vue 218 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/accessReport/kt-sticky.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/data.js
@@ -6,7 +6,6 @@
    method: 'get'
  })
}
export const getDragList = () => {
  return axios.request({
    url: 'get_drag_list',
src/store/module/user.js
@@ -6,7 +6,8 @@
  getContentByMsgId,
  hasRead,
  removeReaded,
  restoreTrash
  restoreTrash,
  GetPropertyInfoList
} from '@/api/user'
import {setToken, getToken} from '@/libs/util'
import {Message} from 'view-design'
src/view/accessReport/accessReportList.vue
@@ -27,7 +27,7 @@
          <div>Loading</div>
        </Spin>
        <Table ref="accessList" border :columns="accessListColumns" :data="accessList"
                style="margin-top: 12px">
                style="margin-top: 12px" class="assessClass">
          <template slot="action" slot-scope="params">
            <Tooltip content="编辑" class="tableActionMargin"  theme="light" transfer max-width="200"
                     placement="top">
@@ -262,13 +262,43 @@
        title: '评估主体',
        key: 'SubName',
        align: 'center',
        minWidth: 100
        minWidth: 100,
        render:(h, params) => {
          if(params.row.SubName.length>0){
            return h('div',params.row.SubName.map(v=>{
                return h('div',{
                  class:"tableTclass",
                  domProps:{
                    innerHTML:v
                  }
                })
              })
            )
          }else{
            return h('span', params.row.SubName)
          }
        }
      })
      columns.push({
        title: '评估财报期间',
        key: 'EvaReport',
        key: 'EvaReportArr',
        align: 'center',
        minWidth: 100
        minWidth: 100,
        render:(h, params) => {
          if(params.row.EvaReportArr.length>0){
            return h('div',params.row.EvaReportArr.map(v=>{
                return h('div',{
                  class:"tableEclass",
                  domProps:{
                    innerHTML:v
                  }
                })
              })
            )
          }else{
            return h('span', params.row.EvaReportArr)
          }
        }
      })
      columns.push({
        title: '评估基准日',
@@ -316,7 +346,22 @@
}
</script>
<style scoped>
<style>
  .tableEclass{
    padding: 8px 0;
  }
  .tableEclass:nth-child(n+2){
    border-top: 1px solid #e8eaec;
  }
  .assessClass .ivu-table th, .ivu-table td, .ivu-table-cell{
    padding: 0;
  }
  .tableTclass:nth-child(n+2){
    border-top: 1px solid #e8eaec;
  }
  .tableTclass{
    padding: 8px 0;
  }
  .accessTableClass .ipt_form_style{
    margin-bottom: 0px;
  }
src/view/accessReport/chooseAssess.vue
@@ -17,8 +17,8 @@
    </Card>
    <div style="margin-top: 12px;position: relative">
      <Card>
        <div id="navbar" style="background: #fff;">
          <div>
        <ktsticky :sticky-top="80">
          <div  id="navBar">
            <Steps :current="current">
              <Step title="选择评估主体"></Step>
              <Step title="主体属性"></Step>
@@ -29,7 +29,7 @@
              <Step title="生成报告"></Step>
            </Steps>
          </div>
        </div>
        </ktsticky>
        <div style="position: absolute;width: 100%;left:0;">
        <div  style="margin: 25px 0;" class="firstCardClass"  v-show="current=='0'">
          <Card>
@@ -92,7 +92,7 @@
              </Spin>
              <div style="border-bottom: 1px solid #dcdee2;border-color: #e8eaec;padding: 0 0 12px 12px">请设置主体年利率</div>
              <Table ref="thirdList" border :columns="thirdListColumns" :data="thirdList">
                  <template slot="PriAnnual" slot-scope="params">
                  <template slot="PriAnnuals" slot-scope="params">
                    <cashInput v-model="params.row.PriAnnual"
                               size="large"
                               :rule="/^100$|^(d|[1-9]\d)(\.\d+)*$/"
@@ -166,14 +166,6 @@
                             </span>
                            </span>
                       </span>
                      <!--<ul>-->
                        <!--<li>{{item.CourseTitle}}</li>-->
                      <!--</ul>-->
                      <!--<span v-show="item.Children.length>0&&item.Children[0].MoveFlag===true">-->
                          <!--<Select v-model="fifithSelectFirst" style="margin: 5px;width:50%">-->
                            <!--<Option v-for="i in item.Children" :value="i.CourseTitle" :label="i.CourseTitle">{{i.CourseTitle}}</Option>-->
                         <!--</Select>-->
                       <!--</span>-->
                    </div>
                  </div>
                </Card>
@@ -208,17 +200,49 @@
        </div>
          <div v-show="current==='5'||current===5" class="sixthCardClass">
            <Card  style="margin: 25px 0;">
              <Spin v-show="loadingfifth" fix>
              <Spin v-show="loadingsixth" fix>
                <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
                <div>Loading</div>
              </Spin>
              <div style="border-bottom: 1px solid #dcdee2;border-color: #e8eaec;padding: 0 0 12px 12px">请选择科目归属</div>
              <div style="border-bottom: 1px solid #dcdee2;border-color: #e8eaec;padding: 0 0 12px 12px">请设置评估参数</div>
              <div>
                <h4 style="padding: 12px;font-size: 16px">经营参数</h4>
                <Table  ref="sixthList" border :columns="sixthListColumns" :data="sixthList">
                </Table>
              </div>
              <div>
                <h4 style="padding: 12px;font-size: 16px">回收/支付参数</h4>
                <Table  ref="sixthTwoList" border :columns="sixthTwoListColumns" :data="sixthTwoList">
                  <template slot="FrequencyIdSlot" slot-scope="params">
                      <Select v-model="params.row.FrequencyId">
                        <Option value="按年">按年</Option>
                        <Option value="按半年">按半年</Option>
                        <Option value="按季">按季</Option>
                        <Option value="按月">按月</Option>
                      </Select>
                  </template>
                  <template slot="RecoveryTimeSlot" slot-scope="params">
                    <Input  v-model="params.row.RecoveryTime"/>
                  </template>
                  <template slot="ClassLabelSetSlot" slot-scope="params">
                    <Select v-model="params.row.ClassLabel">
                      <Option></Option>
                    </Select>
                  </template>
                  <template slot="LocationSlot" slot-scope="params">
                    <Select v-model="params.row.Country">
                      <Option></Option>
                    </Select>
                  </template>
                </Table>
              </div>
            </Card>
          </div>
          <div style="text-align: center;margin-bottom: 12px;margin-top: -25px">
            <Card>
            <Button type="primary" @click="back" style="margin-right: 15px" size="large"  :disabled="current=='0'">上一步</Button>
            <Button type="primary" @click="next" style="margin-left: 15px;" size="large">下一步</Button>
                <Button type="primary" @click="back" style="margin-right: 15px" size="large"  :disabled="current=='0'">上一步</Button>
                <Button type="primary" @click="next" style="margin-left: 15px;" size="large">下一步</Button>
            </Card>
          </div>
        </div>
@@ -261,10 +285,12 @@
import $ from 'jquery'
import axios from '@/libs/api.request'
import {cityList} from '@/publicData'
import ktsticky from '@/view/accessReport/kt-sticky.vue'
export default {
  name: 'chooseAssess',
  components: {
    showProjectMessage
    showProjectMessage,
    ktsticky
  },
  data () {
    return {
@@ -317,7 +343,10 @@
      fifithSelectFirst:"",
      cunchuFuzhaiMenu:[], //负债的菜单
      cunchuZichanMenu:[],
      sixList:[], //第一步支付table数据
      getdata:[],  //存储数据
      sixthList:[], //第六步数据的table获取
      loadingsixth:false,
      sixthTwoList:[], //第六步第二个table数据获取
    }
  },
  mounted () {
@@ -325,14 +354,8 @@
    this.RId=this.$route.query.Id
    this.FlowId=this.$route.query.FlowId
    this.getZhutiList()
    // window.onscroll=function(){
    //     this.setTop(navbar)
    // }
    window.addEventListener('scroll',this.setTop,true)
  },
  destroyed () {
    // 离开该页面需要移除这个监听的事件,不然会报错
    window.addEventListener('scroll',this.setTop)
    this.getPropertyIdList()
    this.getClassIndustryList()
  },
  watch:{
    FlowId(data){
@@ -350,46 +373,12 @@
        this.getFifthList()
      }else if(this.current===5||this.current==='5'){
        this.getSixthList()
        this.getSixthTwoList()
      }
    }
  },
  methods: {
    setTop(){
      let navbar=document.getElementById("navbar")
      let navbartop=navbar.offsetTop;
      console.log(navbartop)
      let scrollTop=document.body.scrollTop||document.documentElement.scrollTop
      console.log(scrollTop)
      let offsetTop=$("#navbar").offset().top;
      console.log(offsetTop)
      if(offsetTop<30){
        navbar.style.position = "fixed";
        navbar.style.top = 80 + "px";
        navbar.style.zIndex=999
        navbar.style.width="calc(100% - 299px)"
        navbar.style.padding="12px 12px"
        navbar.style.right="28px"
        navbar.style.boxShadow="0 1px 6px rgba(0, 0, 0, 0.2)"
        navbar.style.borderColor='#eee'
        navbar.style.borderBottomLeftRadius="5px"
        navbar.style.borderBottomRightRadius="5px"
      }
      // else{
      //   navbar.style.position = "relative";
      //   navbar.style.top ="auto"
      //   navbar.style.zIndex=999
      //   navbar.style.width="auto"
      //   navbar.style.padding="0"
      //   navbar.style.right="auto"
      //   navbar.style.boxShadow="0 1px 6px rgba(0, 0, 0, 0)"
      //   navbar.style.borderColor='#fff'
      //   navbar.style.borderBottomLeftRadius="0px"
      //   navbar.style.borderBottomRightRadius="0px"
      // }
      // navbar.style.position = "fixed";
      // navbar.style.top = scrollTop + 30 + "px";
    },
    getSixthList(){
    getSixthTwoList(){
      let data={
        RId:this.RId,
        FlowId:this.current+1,
@@ -400,7 +389,24 @@
        method: 'post'
      }).then(res => {
        if (res.data.Check) {
          this.sixList=res.data.Data
          this.sixthTwoList=res.data.Data
        } else {
        }
      }, res => {
      })
    },
    getSixthList(){
      let data={
        RId:this.RId,
      }
      axios.request({
        url: '/EvaSubjectEx/GetEvaSubjectList',
        data,
        method: 'post'
      }).then(res => {
        if (res.data.Check) {
          this.sixthList=res.data.Data
        } else {
        }
@@ -460,8 +466,6 @@
                  this.fifthListTwo.push(val)
                }
              })
              console.log(this.fifthListOne)
              console.log(this.cunchuZichanMenu)
            }
            // let a=[...this.fifthList[0].Children,...this.fifthList[1].Children]
            // this.fifthListOne=a
@@ -753,13 +757,16 @@
     **/
    getPropertyIdList(){
      let data={}
      let a
      axios.request({
        url: '/PropertyInfoEx/GetPropertyInfoList',
        data,
        method: 'post'
      }).then(res => {
        if (res.data.Check) {
            this.PropertyIdList=res.data.Data
          localStorage.setItem(this.getdata,JSON.stringify(res.data.Data))
          this.PropertyIdList=JSON.parse(localStorage.getItem(this.getdata))
            // this.PropertyIdList=this.getdata
        } else {
        }
@@ -774,13 +781,16 @@
      let data={
        RangeFlag:"All"
      }
      let a
      axios.request({
        url: '/Industry/GetIndustryList',
        data,
        method: 'post'
      }).then(res => {
        if (res.data.Check) {
          this.ClassLabelSet=res.data.Data
          //this.ClassLabelSet=res.data.Data
          localStorage.setItem(a,JSON.stringify(res.data.Data))
          this.ClassLabelSet=JSON.parse(localStorage.getItem(a))
        } else {
        }
@@ -804,8 +814,7 @@
      }).then(res => {
        if (res.data.Check) {
          this.secList= res.data.Data
          this.getClassIndustryList()
          this.getPropertyIdList()
          //this.getClassIndustryList()
          this.loadingT=false
        } else {
@@ -940,6 +949,7 @@
          this.getFifthList()
        }else if(this.current===5||this.current==="5"){
          this.getSixthList()
          this.getSixthTwoList()
        }
      }
    },
@@ -961,7 +971,7 @@
        data={
          SubId:a,
          RId:this.RId,
          FlowId:this.FlowId,
          FlowId:1,
          ProjectId: this.pid
        }
        axios.request({
@@ -971,11 +981,7 @@
        }).then(res => {
          if (res.data.Check) {
            this.getTableList()
            if (this.current == 8) {
              this.$Message.success("已完成全部操作")
            } else {
              this.current += 1
            }
            this.current += 1
          } else {
          }
@@ -1074,7 +1080,8 @@
        }
        this.getFifthList()
      }else if(parseInt(this.current)===4){
       this.getSixthList()
        this.getSixthList()
        this.getSixthTwoList()
        this.current += 1
      }else if(parseInt(this.current)===5){
@@ -1084,6 +1091,63 @@
    }
  },
  computed:{
    sixthTwoListColumns(){
      let columns = []
      columns.push({
        title: '科目类型',
        key: 'Name',
        align: 'center',
      })
      columns.push({
        title: '回收/支付频率',
        key: 'FrequencyId',
        align: 'center',
        slot:"FrequencyIdSlot"
      })
      columns.push({
        title: '回收时限',
        key: 'RecoveryTime',
        align: 'center',
        slot:"RecoveryTimeSlot"
      })
      columns.push({
        title: '行业分类',
        key: 'ClassLabelSet',
        align: 'center',
        slot:"ClassLabelSetSlot"
      })
      columns.push({
        title: '所属地区',
        key: 'Location',
        slot:'LocationSlot',
        align: 'center',
      })
      return columns
    },
    sixthListColumns(){
      let columns = []
      columns.push({
        title: '主体名称',
        key: 'Title',
        align: 'center',
      })
      columns.push({
        title: '剩余经营年数',
        key: 'SurplusYearNum',
        align: 'center',
      })
      columns.push({
        title: '在建工程竣工投产时间',
        key: 'SOPDate',
        align: 'center',
      })
      columns.push({
        title: '在建工程预计新投资金额',
        key: 'NewInvestment',
        align: 'center',
      })
      return columns
    },
    fourthListColumns(){
      let columns = []
      columns.push({
@@ -1133,7 +1197,7 @@
      columns.push({
        title: '主体年利率',
        key: 'PriAnnual',
        slot:'PriAnnual',
        slot:'PriAnnuals',
        align: 'center',
      })
      return columns
src/view/accessReport/kt-sticky.vue
New file
@@ -0,0 +1,106 @@
<template>
  <div :style="{height:height+'px',zIndex:zIndex}">
    <div
      :class="className"
      :style="{top:(isSticky ? stickyTop +'px' : ''),zIndex:zIndex,position:position,width:width,height:height+'px',boxShadow:bs,background:bac,padding:padding+'px',borderBottomLeftRadius:borderBottomLeftRadius+'px',borderBottomRightRadius:borderBottomRightRadius+'px'}"
    >
      <slot>
        <div style="background: #fff">sticky</div>
      </slot>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'kt-sticky',
    props: {
      stickyTop: {
        type: Number,
        default: 0
      },
      zIndex: {
        type: Number,
        default: 10
      },
      className: {
        type: String,
        default: ''
      }
    },
    data() {
      return {
        active: false,
        position: '',
        width: undefined,
        height: undefined,
        isSticky: false,
        bac:"#fff",
        bs:"0 1px 6px rgba(0, 0, 0, 0)",
        padding:"",
        borderBottomRightRadius:'',
        borderBottomLeftRadius:''
      }
    },
    mounted() {
      this.height = this.$el.getBoundingClientRect().height
      window.addEventListener('scroll', this.handleScroll,true)
      window.addEventListener('resize', this.handleResize,true)
    },
    activated() {
      this.handleScroll()
    },
    destroyed() {
      window.removeEventListener('scroll', this.handleScroll)
      window.removeEventListener('resize', this.handleResize)
    },
    methods: {
      sticky() {
        if (this.active) {
          return
        }
        this.position = 'fixed'
        this.active = true
        this.width = this.width + 'px'
        this.isSticky = true
        this.bs="0 1px 6px rgba(0, 0, 0, 0.2)"
        this.padding="12"
        this.height=this.$el.getBoundingClientRect().height+20
        this.borderBottomRightRadius=5
        this.borderBottomLeftRadius=5
      },
      handleReset() {
        if (!this.active) {
          return
        }
        this.reset()
      },
      reset() {
        this.position = ''
        this.width = 'auto'
        this.active = false
        this.isSticky = false
        this.bs="0 1px 6px rgba(0, 0, 0, 0)"
        this.padding="0"
        this.height=this.$el.getBoundingClientRect().height-20
        this.borderBottomRightRadius=0
        this.borderBottomLeftRadius=0
      },
      handleScroll() {
        const width = this.$el.getBoundingClientRect().width
        this.width = width || 'auto'
        const offsetTop = this.$el.getBoundingClientRect().top
        if (offsetTop < this.stickyTop) {
          this.sticky()
          return
        }
        this.handleReset()
      },
      handleResize() {
        if (this.isSticky) {
          this.width = this.$el.getBoundingClientRect().width + 'px'
        }
      }
    }
  }
</script>