Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_cp/dv_cp_wechat_app into dev
This commit is contained in:
		@@ -3,9 +3,7 @@
 | 
			
		||||
    <div class="contents">
 | 
			
		||||
      <u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
 | 
			
		||||
        <u-form-item label="转交给" prop="status" required :border-bottom="false" right-icon="arrow-right" class="first-form" v-if="status == 1">
 | 
			
		||||
          <u-input v-model="forms.status" placeholder="请选择转交对象" @click="toSelectUser" disabled />
 | 
			
		||||
 | 
			
		||||
          <!-- <AiTreePicker :ops="treeList" v-model="forms.status" @select="handerSelect"> </AiTreePicker> -->
 | 
			
		||||
          <u-input v-model="forms.name" placeholder="请选择转交对象" @click="toSelectUser" disabled />
 | 
			
		||||
        </u-form-item>
 | 
			
		||||
        <u-form-item label="事件分类" prop="groupName" required :border-bottom="false" right-icon="arrow-right" v-if="status != 1">
 | 
			
		||||
          <u-input v-model="forms.groupName" placeholder="请选择事件分类" @click="show = true" />
 | 
			
		||||
@@ -26,15 +24,15 @@
 | 
			
		||||
      </u-form>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="btn" v-if="this.status == 1" @click="submit3">
 | 
			
		||||
    <div class="btn" v-if="this.status == 1" @click="confirm">
 | 
			
		||||
      <span>转交事件</span>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="btn" v-if="this.status == 2" @click="submit2">
 | 
			
		||||
    <div class="btn" v-if="this.status == 2" @click="confirm">
 | 
			
		||||
      <span>拒绝受理</span>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="btn" v-if="this.status == 3" @click="submit3">
 | 
			
		||||
    <div class="btn" v-if="this.status == 3" @click="confirm">
 | 
			
		||||
      <span>我已办结</span>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
@@ -52,12 +50,14 @@ export default {
 | 
			
		||||
        groupId: '',
 | 
			
		||||
        content: '',
 | 
			
		||||
        files: [],
 | 
			
		||||
        name: ''
 | 
			
		||||
      },
 | 
			
		||||
      flag: false,
 | 
			
		||||
      show: false,
 | 
			
		||||
      status: '',  //1转交  2拒绝受理  3我已办结
 | 
			
		||||
      myList: [],
 | 
			
		||||
      id: '',
 | 
			
		||||
      selectUser: {}
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  onLoad(option) {
 | 
			
		||||
@@ -66,135 +66,85 @@ export default {
 | 
			
		||||
    this.forms.groupId = option.groupId
 | 
			
		||||
    this.forms.groupName = option.groupName
 | 
			
		||||
    this.typeList()
 | 
			
		||||
    uni.$on('goback', (res) => {
 | 
			
		||||
      this.selectUser = res
 | 
			
		||||
      if(res.name) {
 | 
			
		||||
        this.forms.name = res.name
 | 
			
		||||
      }else{
 | 
			
		||||
        this.forms.name = res.girdName
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //  拒绝 /app/appclapeventinfo/finishByManager
 | 
			
		||||
    //  同意 /app/appclapeventinfo/finishByGirdMember
 | 
			
		||||
 | 
			
		||||
    // 拒绝
 | 
			
		||||
    submit2() {
 | 
			
		||||
      if (this.flag) return
 | 
			
		||||
 | 
			
		||||
      this.$refs.uForm.validate((valid) => {
 | 
			
		||||
        if (valid) {
 | 
			
		||||
          if (this.status == 2 || this.status == 3) {
 | 
			
		||||
            if (!this.forms.groupName) {
 | 
			
		||||
              return this.$u.toast('请选择事件分类')
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (!this.forms.content) {
 | 
			
		||||
              return this.$u.toast(this.status == 2 ? '请输入拒绝受理意见' : '请输入你的办结意见')
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          const imgs = []
 | 
			
		||||
          if (this.forms.files) {
 | 
			
		||||
            this.forms.files.map((e) => {
 | 
			
		||||
              imgs.push({ url: e.url, id: e.id })
 | 
			
		||||
            })
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          this.flag = true
 | 
			
		||||
          this.$http
 | 
			
		||||
            .post('/app/appclapeventinfo/refuse', {
 | 
			
		||||
              groupName: this.forms.groupName,
 | 
			
		||||
              groupId: this.forms.groupId,
 | 
			
		||||
              content: this.forms.content,
 | 
			
		||||
              files: imgs || [],
 | 
			
		||||
              id: this.id,
 | 
			
		||||
            })
 | 
			
		||||
            .then((res) => {
 | 
			
		||||
              if (res.code == 0) {
 | 
			
		||||
                this.$u.toast('受理成功')
 | 
			
		||||
                this.forms = {}
 | 
			
		||||
                this.flag = false
 | 
			
		||||
                uni.$emit('nextList')
 | 
			
		||||
                setTimeout(() => {
 | 
			
		||||
                  uni.navigateBack()
 | 
			
		||||
                }, 600)
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$u.toast('失败')
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    // 同意
 | 
			
		||||
    submit3() {
 | 
			
		||||
      if (this.flag) return
 | 
			
		||||
 | 
			
		||||
      this.$refs.uForm.validate((valid) => {
 | 
			
		||||
        if (valid) {
 | 
			
		||||
          if (this.status == 2 || this.status == 3) {
 | 
			
		||||
            if (!this.forms.groupName) {
 | 
			
		||||
              return this.$u.toast('请选择事件分类')
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (!this.forms.content) {
 | 
			
		||||
              return this.$u.toast(this.status == 2 ? '请输入拒绝受理意见' : '请输入你的办结意见')
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          const imgs = []
 | 
			
		||||
          if (this.forms.files) {
 | 
			
		||||
            this.forms.files.map((e) => {
 | 
			
		||||
              imgs.push({ url: e.url, id: e.id })
 | 
			
		||||
            })
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          this.flag = true
 | 
			
		||||
          this.$http
 | 
			
		||||
            .post('/app/appclapeventinfo/finishByGirdMember', {
 | 
			
		||||
              groupName: this.forms.groupName,
 | 
			
		||||
              groupId: this.forms.groupId,
 | 
			
		||||
              content: this.forms.content,
 | 
			
		||||
              files: imgs || [],
 | 
			
		||||
              id: this.id,
 | 
			
		||||
            })
 | 
			
		||||
            .then((res) => {
 | 
			
		||||
              if (res.code == 0) {
 | 
			
		||||
                this.$u.toast('受理成功')
 | 
			
		||||
                this.flag = false
 | 
			
		||||
                this.forms = {}
 | 
			
		||||
                uni.$emit('nextList')
 | 
			
		||||
                setTimeout(() => {
 | 
			
		||||
                  uni.navigateBack()
 | 
			
		||||
                }, 600)
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$u.toast('失败')
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    typeList() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(`/app/appclapeventgroup/list`, null, {
 | 
			
		||||
          params: {
 | 
			
		||||
            size: 9999,
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          if (res.code == 0) {
 | 
			
		||||
            this.myList = res.data.records
 | 
			
		||||
            this.$forceUpdate()
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      this.$http.post(`/app/appclapeventgroup/list`, null, {
 | 
			
		||||
        params: {
 | 
			
		||||
          size: 9999,
 | 
			
		||||
        },
 | 
			
		||||
      })
 | 
			
		||||
      .then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.myList = res.data.records
 | 
			
		||||
          this.$forceUpdate()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    selectStatus(e) {
 | 
			
		||||
      console.log(e)
 | 
			
		||||
      if (this.show) {
 | 
			
		||||
        this.forms.groupName = e[0].label
 | 
			
		||||
        this.forms.groupId = e[0].value
 | 
			
		||||
      } else {
 | 
			
		||||
    confirm() {
 | 
			
		||||
      if(this.status == 1 && !this.forms.name) {
 | 
			
		||||
        return this.$u.toast('请选择转交对象')
 | 
			
		||||
      }
 | 
			
		||||
      if(this.status != 1 && !this.forms.groupName) {
 | 
			
		||||
        return this.$u.toast('请选择分类')
 | 
			
		||||
      }
 | 
			
		||||
      if(this.status != 1 && !this.forms.content) {
 | 
			
		||||
        return this.$u.toast('请输入意见')
 | 
			
		||||
      }
 | 
			
		||||
      this.submit()
 | 
			
		||||
    },
 | 
			
		||||
    submit() {  //status 1转交  2拒绝受理  3我已办结
 | 
			
		||||
      var url = '', successText= '', params= ''
 | 
			
		||||
      if(this.status == 1) {
 | 
			
		||||
        url = `/app/appclapeventinfo/transfer`
 | 
			
		||||
        successText = '转交成功'
 | 
			
		||||
        params = {
 | 
			
		||||
          ...this.forms,
 | 
			
		||||
          girdId: this.selectUser.id,
 | 
			
		||||
          girdName: this.selectUser.girdName,
 | 
			
		||||
        }
 | 
			
		||||
        if(this.selectUser.name) { //选择的网格员
 | 
			
		||||
          this.params.girdId = this.selectUser.girdId
 | 
			
		||||
          this.params.girdMemberId = this.selectUser.id
 | 
			
		||||
          this.params.girdMemberName = this.selectUser.name
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      if(this.status == 2) {
 | 
			
		||||
        url = `/app/appclapeventinfo/refuse`
 | 
			
		||||
        successText = '拒绝成功'
 | 
			
		||||
        params = {...this.forms}
 | 
			
		||||
      }
 | 
			
		||||
      if(this.status == 3) {
 | 
			
		||||
        url = `/app/appclapeventinfo/finishByGirdMember`
 | 
			
		||||
        successText = '办结成功'
 | 
			
		||||
        params = {...this.forms}
 | 
			
		||||
      }
 | 
			
		||||
      params.id = this.id
 | 
			
		||||
      this.$http.post(url, params).then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.$u.toast(successText)
 | 
			
		||||
          uni.$emit('updateDeatil')
 | 
			
		||||
          uni.$emit('getListInit')
 | 
			
		||||
          setTimeout(() => {
 | 
			
		||||
            uni.navigateBack()
 | 
			
		||||
          },600)
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    selectStatus(e) {
 | 
			
		||||
      this.forms.groupName = e[0].label
 | 
			
		||||
      this.forms.groupId = e[0].value
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handerSelect() {},
 | 
			
		||||
 | 
			
		||||
    toSelectUser() {
 | 
			
		||||
      uni.navigateTo({ url: './SelectUser' })
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -114,7 +114,7 @@
 | 
			
		||||
        <div class="doIt" @click="doItShow = true">我来受理</div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="endDoIt" v-if="data.eventStatus == 1" @click="toContent(3)">我已办结</div>
 | 
			
		||||
      <div class="endDoIt" v-if="data.eventStatus == 1" @click="toContent(3)">前往办理</div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <u-modal v-model="doItShow" :mask-close-able="true" z-index="99" content="确定受理该事件?" :show-cancel-button="true" @confirm="doThings"></u-modal>
 | 
			
		||||
@@ -141,7 +141,7 @@ export default {
 | 
			
		||||
      this.getDetail()
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    uni.$on('nextList', () => {
 | 
			
		||||
    uni.$on('updateDeatil', () => {
 | 
			
		||||
      this.getDetail()
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
@@ -162,7 +162,6 @@ export default {
 | 
			
		||||
    doThings() {
 | 
			
		||||
      this.$http.post(`/app/appclapeventinfo/acceptance?id=${this.id}`).then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.$u.toast('受理成功!')
 | 
			
		||||
          this.getDetail()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
 
 | 
			
		||||
@@ -95,6 +95,11 @@ export default {
 | 
			
		||||
      this.current ++
 | 
			
		||||
      this.getList()
 | 
			
		||||
    })
 | 
			
		||||
    uni.$on('getListInit', ()=>{
 | 
			
		||||
      this.current = 1
 | 
			
		||||
      this.getList()
 | 
			
		||||
    })
 | 
			
		||||
    
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.$dict.load('clapEventStatus').then(() => {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,20 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="SelectUser" v-if="showPage">
 | 
			
		||||
  <div class="SelectUser">
 | 
			
		||||
    <div class="header-middle">
 | 
			
		||||
      <div class="hint">
 | 
			
		||||
        <span style="color:#3F8DF5" v-for="(item, index) in slectList" :key="index">{{item.girdName}}</span>
 | 
			
		||||
        <span v-for="(item, index) in slectList" :key="index"><span v-if="index" style="margin:0 4px;">/</span><span style="color:#3F8DF5" @click="girdNameClick(item, index)">{{item.girdName}}</span></span>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="showTypes">
 | 
			
		||||
      <div class="showTypes" v-if="!userList.length">
 | 
			
		||||
        <div v-if="treeList.length > 0">
 | 
			
		||||
          <div class="cards" v-for="(item, i) in treeList" :key="i" @click="itemClick(item)">
 | 
			
		||||
            <img src="./components/img/tx@2x.png" alt="" />
 | 
			
		||||
          <div class="cards" v-for="(item, index) in treeList" :key="index" @click="itemClick(item)">
 | 
			
		||||
            <div class="imges">
 | 
			
		||||
              <span v-if="item.girdLevel == 2">
 | 
			
		||||
                <img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked" @click.stop="girdClick(item, index)" />
 | 
			
		||||
                <img src="./components/img/xz.png" alt="" class="imgselect" v-else @click.stop="girdClick(item, index)" />
 | 
			
		||||
              </span>
 | 
			
		||||
              <img src="./components/img/tx@2x.png" alt="" class="avatras" />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="rightes">
 | 
			
		||||
              <div class="applicationNames">{{ item.girdName }}</div>
 | 
			
		||||
              <img src="./components/img/right-icon.png" alt="" class="imgs" />
 | 
			
		||||
@@ -19,7 +25,7 @@
 | 
			
		||||
        <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <!-- <div class="showUsers" v-else>
 | 
			
		||||
      <div class="showUsers" v-else>
 | 
			
		||||
        <div v-if="userList.length > 0">
 | 
			
		||||
          <div class="cards" v-for="(e, index) in userList" :key="index">
 | 
			
		||||
            <div class="imges">
 | 
			
		||||
@@ -31,20 +37,19 @@
 | 
			
		||||
 | 
			
		||||
            <div class="rights">
 | 
			
		||||
              <div class="applicationNames">{{ e.name }}</div>
 | 
			
		||||
              <div class="idNumbers">{{ e.idNumber && e.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1******$2') }}</div>
 | 
			
		||||
              <div class="idNumbers">{{ e.phone }}</div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
 | 
			
		||||
      </div> -->
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="subBtn" @click="submit">
 | 
			
		||||
      <div>确定选择</div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <!-- <AiBck /> -->
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@@ -53,20 +58,11 @@ export default {
 | 
			
		||||
  name: 'SelectUser',
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      
 | 
			
		||||
      typeList: [],
 | 
			
		||||
      userList: [],
 | 
			
		||||
      keyword: '',
 | 
			
		||||
      current: 1,
 | 
			
		||||
      showType: true,
 | 
			
		||||
      applicationName: '',
 | 
			
		||||
      applicationId: '',
 | 
			
		||||
      selectUser: {},
 | 
			
		||||
 | 
			
		||||
      allData: null,
 | 
			
		||||
      showPage: false,
 | 
			
		||||
      treeList: [],
 | 
			
		||||
      slectList: []
 | 
			
		||||
      slectList: [],
 | 
			
		||||
      userList: [],
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  onLoad() {
 | 
			
		||||
@@ -74,47 +70,100 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getTree() {
 | 
			
		||||
      this.slectList = []
 | 
			
		||||
      this.$http.post('/app/appgirdinfo/listAllByTop').then((res) => {
 | 
			
		||||
        if (res?.data) {
 | 
			
		||||
          this.allData = res.data
 | 
			
		||||
          if(this.allData[0].isLastLevel == 1) {
 | 
			
		||||
            this.treeList = this.allData[0].girdMemberList
 | 
			
		||||
          }else {
 | 
			
		||||
            this.treeList = this.allData[0].girdList
 | 
			
		||||
          }
 | 
			
		||||
          var obj = {
 | 
			
		||||
            girdName: this.allData[0].girdName,
 | 
			
		||||
            girdId: this.allData[0].girdId
 | 
			
		||||
          }
 | 
			
		||||
          this.slectList.push(obj)
 | 
			
		||||
          this.showPage = true
 | 
			
		||||
          this.treeInit()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    treeInit() {
 | 
			
		||||
      if(this.allData[0].isLastLevel == 1) {
 | 
			
		||||
        this.userList = this.allData[0].girdMemberList
 | 
			
		||||
        this.userList.map((item) => {
 | 
			
		||||
          item.isChecked = false
 | 
			
		||||
        })
 | 
			
		||||
      }else {
 | 
			
		||||
        this.treeList = this.allData[0].girdList
 | 
			
		||||
      }
 | 
			
		||||
      var obj = {
 | 
			
		||||
        girdName: this.allData[0].girdName,
 | 
			
		||||
        id: this.allData[0].id,
 | 
			
		||||
        girdLevel: this.allData[0].girdLevel
 | 
			
		||||
      }
 | 
			
		||||
      this.slectList.push(obj)
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    itemClick(row) {
 | 
			
		||||
      console.log(row)
 | 
			
		||||
      this.$http.post(`/app/appgirdinfo/listAll2?id=${row.id}`).then((res) => {
 | 
			
		||||
        if (res?.data) {
 | 
			
		||||
          // this.allData = res.data
 | 
			
		||||
          // if(this.allData[0].isLastLevel == 1) {
 | 
			
		||||
          //   this.treeList = this.allData[0].girdMemberList
 | 
			
		||||
          // }else {
 | 
			
		||||
          //   this.treeList = this.allData[0].girdList
 | 
			
		||||
          // }
 | 
			
		||||
          // var obj = {
 | 
			
		||||
          //   girdName: this.allData[0].girdName,
 | 
			
		||||
          //   girdId: this.allData[0].girdId
 | 
			
		||||
          // }
 | 
			
		||||
          // this.slectList.push(obj)
 | 
			
		||||
          // this.showPage = true
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
      var obj = {
 | 
			
		||||
        girdName: row.girdName,
 | 
			
		||||
        id: row.id,
 | 
			
		||||
        girdLevel: row.girdLevel
 | 
			
		||||
      }
 | 
			
		||||
      this.slectList.push(obj)
 | 
			
		||||
      this.searckGird(row)
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    searckGird(row) {
 | 
			
		||||
      if(row.girdLevel != 2) { //查网格
 | 
			
		||||
        this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
 | 
			
		||||
          if (res?.data) {
 | 
			
		||||
            this.treeList = res.data.records
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      }else { //查网格员
 | 
			
		||||
        this.$http.post(`/app/appgirdmemberinfo/listByGirdId`, {
 | 
			
		||||
          appGirdMemberInfo: {
 | 
			
		||||
            girdId: row.id
 | 
			
		||||
          }
 | 
			
		||||
        }).then((res) => {
 | 
			
		||||
          if (res?.data) {
 | 
			
		||||
            this.userList = res.data
 | 
			
		||||
            this.userList.map((item) => {
 | 
			
		||||
              item.isChecked = false
 | 
			
		||||
            })
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    girdNameClick(row, index) {
 | 
			
		||||
      this.userList = []
 | 
			
		||||
      if(!index) { //第一级别
 | 
			
		||||
        this.slectList = []
 | 
			
		||||
        this.treeInit()
 | 
			
		||||
      }else {
 | 
			
		||||
        var list = []
 | 
			
		||||
        this.slectList.map((item, i) => {
 | 
			
		||||
          if(i <= index) {
 | 
			
		||||
            list.push(item)
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        this.slectList = list
 | 
			
		||||
        this.searckGird(row)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    girdClick(row, index) {
 | 
			
		||||
      if (this.treeList[index].isChecked) {//取消
 | 
			
		||||
        this.treeList[index].isChecked = false
 | 
			
		||||
        this.selectUser = {}
 | 
			
		||||
      } else {
 | 
			
		||||
        this.treeList.map((item) => {
 | 
			
		||||
          item.isChecked = false
 | 
			
		||||
        })
 | 
			
		||||
        this.treeList[index].isChecked = true
 | 
			
		||||
        this.selectUser = row
 | 
			
		||||
      }
 | 
			
		||||
      this.$forceUpdate()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    userClick(row, index) {
 | 
			
		||||
      if (this.userList[index].isChecked) {
 | 
			
		||||
        //取消
 | 
			
		||||
      if (this.userList[index].isChecked) {//取消
 | 
			
		||||
        this.userList[index].isChecked = false
 | 
			
		||||
        this.selectUser = {}
 | 
			
		||||
      } else {
 | 
			
		||||
@@ -124,74 +173,18 @@ export default {
 | 
			
		||||
        this.userList[index].isChecked = true
 | 
			
		||||
        this.selectUser = row
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getTypeList() {
 | 
			
		||||
      this.userList = []
 | 
			
		||||
      this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0&status=1`).then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.typeList = res.data
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getUsers() {
 | 
			
		||||
      uni.showLoading({
 | 
			
		||||
        title: '加载中',
 | 
			
		||||
      })
 | 
			
		||||
      this.$http.post(`/app/appapplicationinfo/list?appId=${this.appId}¤t=${this.current}&size=${999}`, { searchParam: this.keyword }).then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          res.data.records.map((item) => {
 | 
			
		||||
            item.isChecked = false
 | 
			
		||||
          })
 | 
			
		||||
          uni.hideLoading()
 | 
			
		||||
          this.userList = res.data.records
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
      this.$forceUpdate()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    submit() {
 | 
			
		||||
      if (this.selectUser.id != null) {
 | 
			
		||||
        uni.$emit('goBack', { selectUser: this.selectUser, applicationName: this.applicationName, applicationId: this.applicationId })
 | 
			
		||||
        uni.$emit('goback', this.selectUser)
 | 
			
		||||
        uni.navigateBack()
 | 
			
		||||
      } else {
 | 
			
		||||
        return this.$u.toast('请选择人员')
 | 
			
		||||
        return this.$u.toast('请选择网格或网格员')
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toUserSelect(item) {
 | 
			
		||||
      this.applicationName = item.applicationName
 | 
			
		||||
      this.applicationId = item.id
 | 
			
		||||
      this.appId = item.id
 | 
			
		||||
      this.getUsers()
 | 
			
		||||
 | 
			
		||||
      this.showType = false
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    back() {
 | 
			
		||||
      this.keyword = ''
 | 
			
		||||
      this.typeList = []
 | 
			
		||||
      this.userList = []
 | 
			
		||||
      this.applicationName = ''
 | 
			
		||||
      this.showType = true
 | 
			
		||||
      this.getTypeList()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handerSearch(e) {
 | 
			
		||||
      if (!this.showType) {
 | 
			
		||||
        this.keyword = e
 | 
			
		||||
        this.current = 1
 | 
			
		||||
        // this.getUser()
 | 
			
		||||
        this.getUsers()
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handerClear() {
 | 
			
		||||
      this.keyword = ''
 | 
			
		||||
      this.current = 1
 | 
			
		||||
      this.getUsers()
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
@@ -229,6 +222,23 @@ export default {
 | 
			
		||||
        // background: pink;
 | 
			
		||||
        padding: 0 0 0 32px;
 | 
			
		||||
 | 
			
		||||
        .imges {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
          // width: 200px;
 | 
			
		||||
          .imgselect {
 | 
			
		||||
            width: 48px;
 | 
			
		||||
            height: 48px;
 | 
			
		||||
            vertical-align: middle;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          .avatras {
 | 
			
		||||
            width: 74px;
 | 
			
		||||
            height: 74px;
 | 
			
		||||
            border-radius: 8px;
 | 
			
		||||
            margin-left: 36px;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        img {
 | 
			
		||||
          width: 74px;
 | 
			
		||||
          height: 74px;
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,8 @@
 | 
			
		||||
      <div class="leftInput" @click="showBottomInput = true">我来说两句...</div>
 | 
			
		||||
 | 
			
		||||
      <div class="righticon">
 | 
			
		||||
        <u-icon name="thumb-up"></u-icon>
 | 
			
		||||
        <u-icon name="thumb-up" @click="praise"></u-icon>
 | 
			
		||||
 | 
			
		||||
        <span class="icontext">赞</span>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -69,6 +70,8 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapState } from 'vuex'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'Detail',
 | 
			
		||||
  props: {},
 | 
			
		||||
@@ -79,15 +82,19 @@ export default {
 | 
			
		||||
      timestamp: '',
 | 
			
		||||
      showBottomInput: false,
 | 
			
		||||
      content: '',
 | 
			
		||||
      flag: false,
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    ...mapState(['user']),
 | 
			
		||||
 | 
			
		||||
    commentCount() {
 | 
			
		||||
      return this.data.messages?.length || 0
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  watch: {},
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    console.log(this.user)
 | 
			
		||||
    this.id = o.id
 | 
			
		||||
    this.getDetail()
 | 
			
		||||
    this.$dict.load('discussStatus')
 | 
			
		||||
@@ -115,7 +122,43 @@ export default {
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    publish() {},
 | 
			
		||||
    publish() {
 | 
			
		||||
      if (this.flag) return
 | 
			
		||||
      if (!this.content) {
 | 
			
		||||
        return this.$u.toast('请输入你的想法')
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(`/app/appvillagediscussmessage/addOrUpdate`, {
 | 
			
		||||
          content: this.content,
 | 
			
		||||
          avatar: this.user.avatar,
 | 
			
		||||
          createUserId: this.user.id,
 | 
			
		||||
          createUserName: this.user.name,
 | 
			
		||||
          discussId: this.id,
 | 
			
		||||
        })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          if (res?.code == 0) {
 | 
			
		||||
            this.$u.toast('留言成功')
 | 
			
		||||
            this.flag = true
 | 
			
		||||
            this.showBottomInput = false
 | 
			
		||||
            this.getDetail()
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    praise() {
 | 
			
		||||
      console.log('点赞')
 | 
			
		||||
      this.$http.post(`/app/appvillagediscussmessage/suport?id=${this.id}&userId=${this.user.id}`).then((res) => {
 | 
			
		||||
        if (res?.code == 0) {
 | 
			
		||||
          this.$u.toast('点赞成功!')
 | 
			
		||||
          this.getDetail()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    a() {
 | 
			
		||||
      console.log(aa)
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    previewImage(images, img) {
 | 
			
		||||
      uni.previewImage({
 | 
			
		||||
@@ -322,6 +365,9 @@ export default {
 | 
			
		||||
            .uni-textarea-placeholder {
 | 
			
		||||
              padding: 16px 0 0 16px;
 | 
			
		||||
            }
 | 
			
		||||
            .uni-textarea-textarea {
 | 
			
		||||
              padding: 16px 0 0 16px;
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
          .words {
 | 
			
		||||
            background: #f7f7f7;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user