优化走访慰问
This commit is contained in:
		@@ -48,7 +48,7 @@
 | 
			
		||||
 | 
			
		||||
            <div class="addBtns">
 | 
			
		||||
              <span> 点击</span>
 | 
			
		||||
              <span class="toAdds" @click="goDetail">新增按钮</span>
 | 
			
		||||
              <span class="toAdds" @click="goDetail()">新增按钮</span>
 | 
			
		||||
              <span> 试试试吧~</span>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
@@ -61,23 +61,16 @@
 | 
			
		||||
        <div class="addBtn iconfont iconfont-iconfangda" @tap.stop="goDetail()" />
 | 
			
		||||
      </AiFixedBtn>
 | 
			
		||||
    </template>
 | 
			
		||||
 | 
			
		||||
    <component v-else :is="comp" :params="params"></component>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapState } from 'vuex'
 | 
			
		||||
import add from './add.vue'
 | 
			
		||||
import detail from './detail.vue'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'AppWalkask',
 | 
			
		||||
  appName: '走访慰问',
 | 
			
		||||
  components: {
 | 
			
		||||
    add,
 | 
			
		||||
    detail,
 | 
			
		||||
  },
 | 
			
		||||
  components: {},
 | 
			
		||||
  props: {},
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
@@ -164,13 +157,13 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    goDetail(item, hint) {
 | 
			
		||||
      this.isList = false
 | 
			
		||||
      if (hint == 1 || hint == 2) {
 | 
			
		||||
        this.comp = hint == 1 ? 'detail' : 'add'
 | 
			
		||||
        this.params = item
 | 
			
		||||
      if (hint == 1) {
 | 
			
		||||
        uni.navigateTo({ url: `./detail?id=${item.id}` })
 | 
			
		||||
      }
 | 
			
		||||
      if (hint == 2) {
 | 
			
		||||
        uni.navigateTo({ url: `./add?id=${item.id}` })
 | 
			
		||||
      } else {
 | 
			
		||||
        this.comp = 'add'
 | 
			
		||||
        this.params = 111
 | 
			
		||||
        uni.navigateTo({ url: `./add` })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@
 | 
			
		||||
      <div class="btn" @click="submit">保存</div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <component v-else :is="comp" :paramss="params" @back="backlist"></component>
 | 
			
		||||
    <component v-else :is="comp" @back="backlist"></component>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@@ -59,9 +59,7 @@ export default {
 | 
			
		||||
  components: {
 | 
			
		||||
    walkObject,
 | 
			
		||||
  },
 | 
			
		||||
  props: {
 | 
			
		||||
    params: {},
 | 
			
		||||
  },
 | 
			
		||||
  props: {},
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      show: false,
 | 
			
		||||
@@ -82,10 +80,12 @@ export default {
 | 
			
		||||
      addList: true,
 | 
			
		||||
      areaIdProps: '',
 | 
			
		||||
      clickedUserSelect: false,
 | 
			
		||||
      id: '',
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: { ...mapState(['user']) },
 | 
			
		||||
  created() {
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    this.id = o.id
 | 
			
		||||
    uni.setNavigationBarTitle({ title: '新建走访' })
 | 
			
		||||
    this.areaIdProps = this.user.areaId
 | 
			
		||||
    this.forms.areaId = this.user.areaId
 | 
			
		||||
@@ -96,10 +96,11 @@ export default {
 | 
			
		||||
  mounted() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    getDetail() {
 | 
			
		||||
      if (this.params.id) {
 | 
			
		||||
        this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.params.id}`).then((res) => {
 | 
			
		||||
      if (this.id) {
 | 
			
		||||
        this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
 | 
			
		||||
          if (res?.data) {
 | 
			
		||||
            this.forms = res.data
 | 
			
		||||
            this.forms.create_user_name = res.data.name
 | 
			
		||||
            this.forms.realityValue = res.data.reality
 | 
			
		||||
            this.forms.reality = this.$dict.getLabel('realityStatus', res.data.reality)
 | 
			
		||||
            if (res.data.images) {
 | 
			
		||||
 
 | 
			
		||||
@@ -44,10 +44,12 @@ export default {
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      data: {},
 | 
			
		||||
      id: '',
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {},
 | 
			
		||||
  onLoad() {
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    this.id = o.id
 | 
			
		||||
    uni.setNavigationBarTitle({ title: '走访详情' })
 | 
			
		||||
    this.$dict.load('realityStatus').then(() => {
 | 
			
		||||
      this.getDetail()
 | 
			
		||||
@@ -56,7 +58,7 @@ export default {
 | 
			
		||||
  mounted() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    getDetail() {
 | 
			
		||||
      this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.params.id}`).then((res) => {
 | 
			
		||||
      this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
 | 
			
		||||
        if (res?.data) {
 | 
			
		||||
          this.data = res.data
 | 
			
		||||
          if (this.data.images) {
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,9 @@
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'walkObject',
 | 
			
		||||
  components: {},
 | 
			
		||||
  props: {},
 | 
			
		||||
  props: {
 | 
			
		||||
    params: {},
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      DiyList: {},
 | 
			
		||||
@@ -71,7 +73,8 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {},
 | 
			
		||||
  onLoad() {
 | 
			
		||||
  created() {
 | 
			
		||||
    console.log(1)
 | 
			
		||||
    uni.setNavigationBarTitle({ title: '选择走访慰问对象' })
 | 
			
		||||
    this.getDiyList()
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user