Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		@@ -10,8 +10,8 @@
 | 
			
		||||
 | 
			
		||||
          <div class="line"></div>
 | 
			
		||||
 | 
			
		||||
          <u-form-item label="走访对象" prop="create_user_name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
 | 
			
		||||
            <u-input v-model="forms.create_user_name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
 | 
			
		||||
          <u-form-item label="走访对象" prop="name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
 | 
			
		||||
            <u-input v-model="forms.name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
 | 
			
		||||
          </u-form-item>
 | 
			
		||||
 | 
			
		||||
          <div class="line"></div>
 | 
			
		||||
@@ -68,8 +68,10 @@ export default {
 | 
			
		||||
      forms: {
 | 
			
		||||
        areaId: '',
 | 
			
		||||
        areaName: '',
 | 
			
		||||
 | 
			
		||||
        optionId: '',
 | 
			
		||||
        create_user_name: '',
 | 
			
		||||
        name: '',
 | 
			
		||||
 | 
			
		||||
        reality: '',
 | 
			
		||||
        realityValue: '',
 | 
			
		||||
        menuLevel3Name: '',
 | 
			
		||||
@@ -84,11 +86,14 @@ export default {
 | 
			
		||||
      areaIdProps: '',
 | 
			
		||||
      clickedUserSelect: false,
 | 
			
		||||
      id: '',
 | 
			
		||||
 | 
			
		||||
      name: '',
 | 
			
		||||
      optionId: '',
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: { ...mapState(['user']) },
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    this.id = o.id
 | 
			
		||||
    this.id = o.id ? o.id : ''
 | 
			
		||||
    this.areaIdProps = this.user.areaId
 | 
			
		||||
    if (!this.id) {
 | 
			
		||||
      this.forms.areaId = this.user.areaId
 | 
			
		||||
@@ -97,6 +102,13 @@ export default {
 | 
			
		||||
    this.$dict.load('realityStatus').then(() => {
 | 
			
		||||
      this.getDetail()
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    uni.$on('goBack', (data) => {
 | 
			
		||||
      console.log(data)
 | 
			
		||||
      this.forms.menuLevel3Name = data.applicationName
 | 
			
		||||
      this.forms.name = data.selectUser.name
 | 
			
		||||
      this.forms.optionId = data.selectUser.id
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  onShow() {
 | 
			
		||||
    document.title = '新建走访'
 | 
			
		||||
@@ -105,11 +117,12 @@ export default {
 | 
			
		||||
  methods: {
 | 
			
		||||
    realityClick() {
 | 
			
		||||
      if (this.id) return
 | 
			
		||||
      if (!this.forms.create_user_name) {
 | 
			
		||||
      if (!this.forms.name) {
 | 
			
		||||
        return this.$u.toast('请选择走访对象')
 | 
			
		||||
      }
 | 
			
		||||
      this.showStstus = true
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getDetail() {
 | 
			
		||||
      if (this.id) {
 | 
			
		||||
        this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
 | 
			
		||||
@@ -131,7 +144,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
      this.$refs.uForm.validate((valid) => {
 | 
			
		||||
        if (valid) {
 | 
			
		||||
          if (!this.forms.create_user_name) {
 | 
			
		||||
          if (!this.forms.name) {
 | 
			
		||||
            return this.$u.toast('请选择走访对象')
 | 
			
		||||
          }
 | 
			
		||||
          if (!this.forms.title) {
 | 
			
		||||
@@ -150,9 +163,10 @@ export default {
 | 
			
		||||
            .post(`/app/appvisitvondolence/addOrUpdate`, {
 | 
			
		||||
              areaId: this.forms.areaId,
 | 
			
		||||
              applicationId: this.forms.applicationId,
 | 
			
		||||
              name: this.forms.create_user_name,
 | 
			
		||||
              name: this.forms.name,
 | 
			
		||||
              optionId: this.forms.optionId,
 | 
			
		||||
              menuLevel3Name: this.forms.menuLevel3Name,
 | 
			
		||||
              optionId: this.forms.applicationId,
 | 
			
		||||
 | 
			
		||||
              reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
 | 
			
		||||
              title: this.forms.title,
 | 
			
		||||
              description: this.forms.description,
 | 
			
		||||
@@ -182,13 +196,13 @@ export default {
 | 
			
		||||
      this.forms.areaId = e
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    backlist(e) {
 | 
			
		||||
      this.forms.create_user_name = e.item.create_user_name
 | 
			
		||||
      this.forms.menuLevel3Name = e.menuLevel3Name
 | 
			
		||||
      this.forms.applicationId = e.appId
 | 
			
		||||
      this.forms.optionId = e.item.id
 | 
			
		||||
      this.addList = true
 | 
			
		||||
    },
 | 
			
		||||
    // backlist(e) {
 | 
			
		||||
    //   this.forms.create_user_name = e.item.create_user_name
 | 
			
		||||
    //   this.forms.menuLevel3Name = e.menuLevel3Name
 | 
			
		||||
    //   this.forms.applicationId = e.appId
 | 
			
		||||
    //   this.forms.optionId = e.item.id
 | 
			
		||||
    //   this.addList = true
 | 
			
		||||
    // },
 | 
			
		||||
 | 
			
		||||
    realityStstus(e) {
 | 
			
		||||
      this.forms.reality = e[0].label
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								src/apps/AppWalkask/img/tx@2x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/apps/AppWalkask/img/tx@2x.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.4 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/apps/AppWalkask/img/xz.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/apps/AppWalkask/img/xz.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								src/apps/AppWalkask/img/xzh.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/apps/AppWalkask/img/xzh.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.7 KiB  | 
@@ -15,7 +15,7 @@
 | 
			
		||||
 | 
			
		||||
        <div v-if="typeList.length > 0">
 | 
			
		||||
          <div class="cards" v-for="(item, i) in typeList" :key="i" @click="toUserSelect(item)">
 | 
			
		||||
            <img src="./img/user-img.png" alt="" />
 | 
			
		||||
            <img src="./img/tx@2x.png" alt="" />
 | 
			
		||||
 | 
			
		||||
            <div class="right">
 | 
			
		||||
              <div class="applicationNames">{{ item.applicationName }}</div>
 | 
			
		||||
@@ -31,10 +31,15 @@
 | 
			
		||||
      <div class="showUsers" v-else>
 | 
			
		||||
        <div v-if="userList.length > 0">
 | 
			
		||||
          <div class="cards" v-for="(e, index) in userList" :key="index">
 | 
			
		||||
            <img src="./img/user-img.png" alt="" />
 | 
			
		||||
            <div class="imges">
 | 
			
		||||
              <img src="./img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
 | 
			
		||||
              <img src="./img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
 | 
			
		||||
 | 
			
		||||
              <img src="./img/tx@2x.png" alt="" class="avatras" />
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="right">
 | 
			
		||||
              <div class="applicationNames">{{ e.create_user_name }}</div>
 | 
			
		||||
              <div class="applicationNames">{{ e.name }}</div>
 | 
			
		||||
 | 
			
		||||
              <!-- <img src="./img/2.png" alt="" class="imgs" /> -->
 | 
			
		||||
            </div>
 | 
			
		||||
@@ -45,6 +50,10 @@
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="subBtn" @click="submit">
 | 
			
		||||
      <div>确定选择</div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <!-- <AiBck /> -->
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -62,6 +71,7 @@ export default {
 | 
			
		||||
      current: 1,
 | 
			
		||||
      showType: true,
 | 
			
		||||
      applicationName: '',
 | 
			
		||||
      selectUser: {},
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {},
 | 
			
		||||
@@ -71,6 +81,20 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  onShow() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    userClick(row, index) {
 | 
			
		||||
      if (this.userList[index].isChecked) {
 | 
			
		||||
        //取消
 | 
			
		||||
        this.userList[index].isChecked = false
 | 
			
		||||
        this.selectUser = {}
 | 
			
		||||
      } else {
 | 
			
		||||
        this.userList.map((item) => {
 | 
			
		||||
          item.isChecked = false
 | 
			
		||||
        })
 | 
			
		||||
        this.userList[index].isChecked = true
 | 
			
		||||
        this.selectUser = row
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getTypeList() {
 | 
			
		||||
      this.userList = []
 | 
			
		||||
      this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0&status=1`).then((res) => {
 | 
			
		||||
@@ -83,13 +107,21 @@ export default {
 | 
			
		||||
    getUser(data) {
 | 
			
		||||
      this.$http.post(`/app/appapplicationinfo/list?appId=${data.id}¤t=${this.current}&size=${999}`, { searchParam: this.keyword }).then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          res.data.records.map((item) => {
 | 
			
		||||
            item.isChecked = false
 | 
			
		||||
          })
 | 
			
		||||
          this.userList = res.data.records
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    submit() {
 | 
			
		||||
      uni.$emit('goBack', { selectUser: this.selectUser, applicationName: this.applicationName })
 | 
			
		||||
      uni.navigateBack()
 | 
			
		||||
      // uni.navigateTo({ url: `./add` })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toUserSelect(item) {
 | 
			
		||||
      console.log(item)
 | 
			
		||||
      this.applicationName = item.applicationName
 | 
			
		||||
      this.showType = false
 | 
			
		||||
      this.getUser(item)
 | 
			
		||||
@@ -152,7 +184,7 @@ export default {
 | 
			
		||||
        height: 120px;
 | 
			
		||||
        line-height: 120px;
 | 
			
		||||
        // background: pink;
 | 
			
		||||
        padding: 0 20px 0 32px;
 | 
			
		||||
        padding: 0 0 0 32px;
 | 
			
		||||
 | 
			
		||||
        img {
 | 
			
		||||
          width: 74px;
 | 
			
		||||
@@ -174,6 +206,7 @@ export default {
 | 
			
		||||
          .imgs {
 | 
			
		||||
            width: 40px;
 | 
			
		||||
            height: 40px;
 | 
			
		||||
            margin-right: 20px;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@@ -186,13 +219,25 @@ export default {
 | 
			
		||||
        height: 120px;
 | 
			
		||||
        line-height: 120px;
 | 
			
		||||
        // background: pink;
 | 
			
		||||
        padding: 0 20px 0 32px;
 | 
			
		||||
        padding: 0 0 0 32px;
 | 
			
		||||
 | 
			
		||||
        img {
 | 
			
		||||
          width: 74px;
 | 
			
		||||
          height: 74px;
 | 
			
		||||
          border-radius: 8px;
 | 
			
		||||
        .imges {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
          width: 200px;
 | 
			
		||||
          .imgselect {
 | 
			
		||||
            width: 48px;
 | 
			
		||||
            height: 48px;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          .avatras {
 | 
			
		||||
            width: 74px;
 | 
			
		||||
            height: 74px;
 | 
			
		||||
            border-radius: 8px;
 | 
			
		||||
            margin-left: 36px;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .right {
 | 
			
		||||
          width: 100%;
 | 
			
		||||
          display: flex;
 | 
			
		||||
@@ -213,5 +258,26 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .subBtn {
 | 
			
		||||
    position: fixed;
 | 
			
		||||
    bottom: 0;
 | 
			
		||||
    left: 0;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    height: 118px;
 | 
			
		||||
    background: #f4f8fb;
 | 
			
		||||
    div {
 | 
			
		||||
      width: 192px;
 | 
			
		||||
      height: 80px;
 | 
			
		||||
      line-height: 80px;
 | 
			
		||||
      text-align: center;
 | 
			
		||||
      background: #1365dd;
 | 
			
		||||
      border-radius: 4px;
 | 
			
		||||
      font-size: 32px;
 | 
			
		||||
      color: #fff;
 | 
			
		||||
      margin: 20px 34px 0 0;
 | 
			
		||||
      float: right;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user