eslint
This commit is contained in:
		@@ -3,12 +3,10 @@
 | 
				
			|||||||
    <div class="header-description">
 | 
					    <div class="header-description">
 | 
				
			||||||
      <u-form :model="form" ref="uForm" label-width="auto">
 | 
					      <u-form :model="form" ref="uForm" label-width="auto">
 | 
				
			||||||
        <u-form-item label="主题" prop="content" required label-position="top">
 | 
					        <u-form-item label="主题" prop="content" required label-position="top">
 | 
				
			||||||
          <u-input v-model="form.content" placeholder="请输入标题(1000字以内)" type="textarea" auto-height height="280"
 | 
					          <u-input v-model="form.content" placeholder="请输入标题(1000字以内)" type="textarea" auto-height height="280" maxlength="1000" />
 | 
				
			||||||
                   maxlength="1000"/>
 | 
					 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
        <u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top">
 | 
					        <u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top">
 | 
				
			||||||
          <AiUploader :def.sync="form.images" multiple placeholder="上传图片" :limit="9"
 | 
					          <AiUploader :def.sync="form.images" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
 | 
				
			||||||
                      action="/admin/file/add2"></AiUploader>
 | 
					 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
        <u-form-item label="议事截止时间" prop="discussDeadline" required>
 | 
					        <u-form-item label="议事截止时间" prop="discussDeadline" required>
 | 
				
			||||||
          <AiDateTime v-model="form.discussDeadline" />
 | 
					          <AiDateTime v-model="form.discussDeadline" />
 | 
				
			||||||
@@ -17,8 +15,7 @@
 | 
				
			|||||||
          <AiDateTime v-model="form.publicityDeadline" />
 | 
					          <AiDateTime v-model="form.publicityDeadline" />
 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
        <u-form-item label="议事类型" prop="type" required label-position="top">
 | 
					        <u-form-item label="议事类型" prop="type" required label-position="top">
 | 
				
			||||||
          <div v-for="op in $dict.getDict('discussType')" :key="op.dictValue" class="discussType"
 | 
					          <div v-for="op in $dict.getDict('discussType')" :key="op.dictValue" class="discussType" @click="form.type = op.dictValue" :class="{ current: form.type == op.dictValue }">
 | 
				
			||||||
               @click="form.type=op.dictValue" :class="{current:form.type==op.dictValue}">
 | 
					 | 
				
			||||||
            {{ op.dictName }}
 | 
					            {{ op.dictName }}
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
@@ -48,10 +45,10 @@ export default {
 | 
				
			|||||||
      this.id = o.id
 | 
					      this.id = o.id
 | 
				
			||||||
      this.getDetail()
 | 
					      this.getDetail()
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    this.$dict.load("discussType")
 | 
					    this.$dict.load('discussType')
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  onShow() {
 | 
					  onShow() {
 | 
				
			||||||
    document.title = "新增议事"
 | 
					    document.title = '新增议事'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getDetail() {
 | 
					    getDetail() {
 | 
				
			||||||
@@ -72,11 +69,13 @@ export default {
 | 
				
			|||||||
      if (!this.form.discussDeadline) {
 | 
					      if (!this.form.discussDeadline) {
 | 
				
			||||||
        return this.$u.toast('请选择 议事截止时间')
 | 
					        return this.$u.toast('请选择 议事截止时间')
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.$http.post(`/app/appvillagediscuss/addOrUpdate`, {
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .post(`/app/appvillagediscuss/addOrUpdate`, {
 | 
				
			||||||
          ...this.form,
 | 
					          ...this.form,
 | 
				
			||||||
          images: JSON.stringify(this.form.images),
 | 
					          images: JSON.stringify(this.form.images),
 | 
				
			||||||
          id: this.id,
 | 
					          id: this.id,
 | 
				
			||||||
      }).then((res) => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then((res) => {
 | 
				
			||||||
          if (res?.code == 0) {
 | 
					          if (res?.code == 0) {
 | 
				
			||||||
            uni.$emit('update')
 | 
					            uni.$emit('update')
 | 
				
			||||||
            this.$u.toast('发布成功')
 | 
					            this.$u.toast('发布成功')
 | 
				
			||||||
@@ -153,7 +152,7 @@ export default {
 | 
				
			|||||||
  .discussType {
 | 
					  .discussType {
 | 
				
			||||||
    width: 320px;
 | 
					    width: 320px;
 | 
				
			||||||
    height: 112px;
 | 
					    height: 112px;
 | 
				
			||||||
    background: #F5F5F5;
 | 
					    background: #f5f5f5;
 | 
				
			||||||
    border-radius: 4px;
 | 
					    border-radius: 4px;
 | 
				
			||||||
    font-size: 30px;
 | 
					    font-size: 30px;
 | 
				
			||||||
    font-family: PingFangSC-Medium, PingFang SC;
 | 
					    font-family: PingFangSC-Medium, PingFang SC;
 | 
				
			||||||
@@ -168,17 +167,17 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    &.current {
 | 
					    &.current {
 | 
				
			||||||
      color: #1174FE;
 | 
					      color: #1174fe;
 | 
				
			||||||
      background: #E7F1FE;
 | 
					      background: #e7f1fe;
 | 
				
			||||||
      position: relative;
 | 
					      position: relative;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      &:before {
 | 
					      &:before {
 | 
				
			||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        display: block;
 | 
					        display: block;
 | 
				
			||||||
        content: " ";
 | 
					        content: ' ';
 | 
				
			||||||
        bottom: 0;
 | 
					        bottom: 0;
 | 
				
			||||||
        right: 0;
 | 
					        right: 0;
 | 
				
			||||||
        border: 24px solid #1576FE;
 | 
					        border: 24px solid #1576fe;
 | 
				
			||||||
        border-top-color: transparent;
 | 
					        border-top-color: transparent;
 | 
				
			||||||
        border-left-color: transparent;
 | 
					        border-left-color: transparent;
 | 
				
			||||||
        border-radius: inherit;
 | 
					        border-radius: inherit;
 | 
				
			||||||
@@ -188,7 +187,7 @@ export default {
 | 
				
			|||||||
      &:after {
 | 
					      &:after {
 | 
				
			||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        display: block;
 | 
					        display: block;
 | 
				
			||||||
        content: "✓";
 | 
					        content: '✓';
 | 
				
			||||||
        bottom: 0;
 | 
					        bottom: 0;
 | 
				
			||||||
        right: 0;
 | 
					        right: 0;
 | 
				
			||||||
        color: #fff;
 | 
					        color: #fff;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,9 +2,7 @@
 | 
				
			|||||||
  <div class="AppVillageDiscuss">
 | 
					  <div class="AppVillageDiscuss">
 | 
				
			||||||
    <AiTopFixed v-if="tabs.length > 0">
 | 
					    <AiTopFixed v-if="tabs.length > 0">
 | 
				
			||||||
      <div class="tab-select">
 | 
					      <div class="tab-select">
 | 
				
			||||||
        <div class="item" :class="{active:type == item.dictValue}" v-for="(item) in tabs" :key="item.dictValue"
 | 
					        <div class="item" :class="{ active: type == item.dictValue }" v-for="item in tabs" :key="item.dictValue" @click="tabClick(item.dictValue)">{{ item.dictName }}<span /></div>
 | 
				
			||||||
             @click="tabClick(item.dictValue)">{{ item.dictName }}<span/>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </AiTopFixed>
 | 
					    </AiTopFixed>
 | 
				
			||||||
    <template v-if="datas.length > 0">
 | 
					    <template v-if="datas.length > 0">
 | 
				
			||||||
@@ -16,16 +14,14 @@
 | 
				
			|||||||
              <b class="color-333" v-text="item.createUserName" />
 | 
					              <b class="color-333" v-text="item.createUserName" />
 | 
				
			||||||
              <span class="color-999" v-text="item.createTime" />
 | 
					              <span class="color-999" v-text="item.createTime" />
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="statusTag" :class="{over:item.status>0}"
 | 
					            <div class="statusTag" :class="{ over: item.status > 0 }" v-text="item.status == 0 ? (item.type == 0 ? '征集中' : '投票中') : $dict.getLabel('discussStatus', item.status)" />
 | 
				
			||||||
                 v-text="item.status==0? item.type==0?'征集中':'投票中':$dict.getLabel('discussStatus',item.status)"/>
 | 
					 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <p class="item-content">
 | 
					          <p class="item-content">
 | 
				
			||||||
            <u-parse :html="item.content"></u-parse>
 | 
					            <u-parse :html="item.content"></u-parse>
 | 
				
			||||||
          </p>
 | 
					          </p>
 | 
				
			||||||
          <div v-if="item.images && item.images.length">
 | 
					          <div v-if="item.images && item.images.length">
 | 
				
			||||||
            <div class="img-list" v-if="item.contentType != 1">
 | 
					            <div class="img-list" v-if="item.contentType != 1">
 | 
				
			||||||
              <img :src="items.accessUrl" alt="" v-for="(items, index) in item.images" :key="index" v-if="index < 3"
 | 
					              <img :src="items.accessUrl" alt="" v-for="(items, index) in item.images" :key="index" v-if="index < 3" @click.stop="previewImage(item.images, items.accessUrl)" />
 | 
				
			||||||
                   @click.stop="previewImage(item.images, items.accessUrl)"/>
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="img-list" v-else>
 | 
					            <div class="img-list" v-else>
 | 
				
			||||||
              <video class="video" :src="item.images[0].url" />
 | 
					              <video class="video" :src="item.images[0].url" />
 | 
				
			||||||
@@ -43,8 +39,7 @@
 | 
				
			|||||||
      <div class="addBtn iconfont iconfont-iconDouble_Up" @tap.stop="backTop" v-if="showBackTop" />
 | 
					      <div class="addBtn iconfont iconfont-iconDouble_Up" @tap.stop="backTop" v-if="showBackTop" />
 | 
				
			||||||
    </AiFixedBtn>
 | 
					    </AiFixedBtn>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true"
 | 
					    <u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
 | 
				
			||||||
             :show-title="false" @confirm="delet"></u-modal>
 | 
					 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -67,7 +62,7 @@ export default {
 | 
				
			|||||||
      type: '0',
 | 
					      type: '0',
 | 
				
			||||||
      listName: '',
 | 
					      listName: '',
 | 
				
			||||||
      tabIndex: 0,
 | 
					      tabIndex: 0,
 | 
				
			||||||
      showBackTop: false
 | 
					      showBackTop: false,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
@@ -76,8 +71,8 @@ export default {
 | 
				
			|||||||
      return this.pages <= this.current ? 'loading ' : 'nomore'
 | 
					      return this.pages <= this.current ? 'loading ' : 'nomore'
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    tabs() {
 | 
					    tabs() {
 | 
				
			||||||
      return this.$dict.getDict("discussStatus")
 | 
					      return this.$dict.getDict('discussStatus')
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  onLoad(o) {
 | 
					  onLoad(o) {
 | 
				
			||||||
    this.moduleId = o.moduleId
 | 
					    this.moduleId = o.moduleId
 | 
				
			||||||
@@ -86,10 +81,10 @@ export default {
 | 
				
			|||||||
    uni.$on('update', () => {
 | 
					    uni.$on('update', () => {
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    this.$dict.load("discussStatus")
 | 
					    this.$dict.load('discussStatus')
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  onShow() {
 | 
					  onShow() {
 | 
				
			||||||
    document.title = "居民议事"
 | 
					    document.title = '居民议事'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  onPageScroll(obj) {
 | 
					  onPageScroll(obj) {
 | 
				
			||||||
    this.showBackTop = obj.scrollTop > 0
 | 
					    this.showBackTop = obj.scrollTop > 0
 | 
				
			||||||
@@ -97,8 +92,8 @@ export default {
 | 
				
			|||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    previewImage(images, img) {
 | 
					    previewImage(images, img) {
 | 
				
			||||||
      uni.previewImage({
 | 
					      uni.previewImage({
 | 
				
			||||||
        urls: images.map(v => v.url),
 | 
					        urls: images.map((v) => v.url),
 | 
				
			||||||
        current: img
 | 
					        current: img,
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    tabClick(type) {
 | 
					    tabClick(type) {
 | 
				
			||||||
@@ -112,13 +107,14 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      let { current, type } = this
 | 
					      let { current, type } = this
 | 
				
			||||||
      this.$http.post('/app/appvillagediscuss/list', null, {
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .post('/app/appvillagediscuss/list', null, {
 | 
				
			||||||
          params: { size: 20, current, type },
 | 
					          params: { size: 20, current, type },
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        .then((res) => {
 | 
					        .then((res) => {
 | 
				
			||||||
          if (res?.data) {
 | 
					          if (res?.data) {
 | 
				
			||||||
          res.data.records.forEach(e => {
 | 
					            res.data.records.forEach((e) => {
 | 
				
			||||||
            e.avatar = e.createUserName?.substring(0, 2) || "游客"
 | 
					              e.avatar = e.createUserName?.substring(0, 2) || '游客'
 | 
				
			||||||
              if (e.images) {
 | 
					              if (e.images) {
 | 
				
			||||||
                e.images = JSON.parse(e.images)
 | 
					                e.images = JSON.parse(e.images)
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
@@ -161,9 +157,9 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    backTop() {
 | 
					    backTop() {
 | 
				
			||||||
      uni.pageScrollTo({
 | 
					      uni.pageScrollTo({
 | 
				
			||||||
        scrollTop: 0
 | 
					        scrollTop: 0,
 | 
				
			||||||
      });
 | 
					      })
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  onReachBottom() {
 | 
					  onReachBottom() {
 | 
				
			||||||
    this.current++
 | 
					    this.current++
 | 
				
			||||||
@@ -203,8 +199,8 @@ export default {
 | 
				
			|||||||
  .statusTag {
 | 
					  .statusTag {
 | 
				
			||||||
    padding: 0 12px;
 | 
					    padding: 0 12px;
 | 
				
			||||||
    line-height: 30px;
 | 
					    line-height: 30px;
 | 
				
			||||||
    border: 1px solid #2573FF;
 | 
					    border: 1px solid #2573ff;
 | 
				
			||||||
    color: #2573FF;
 | 
					    color: #2573ff;
 | 
				
			||||||
    font-size: 22px;
 | 
					    font-size: 22px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    &.over {
 | 
					    &.over {
 | 
				
			||||||
@@ -223,7 +219,7 @@ export default {
 | 
				
			|||||||
    width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
    height: 96px;
 | 
					    height: 96px;
 | 
				
			||||||
    line-height: 96px;
 | 
					    line-height: 96px;
 | 
				
			||||||
    background: #3975C6;
 | 
					    background: #3975c6;
 | 
				
			||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .item {
 | 
					    .item {
 | 
				
			||||||
@@ -231,7 +227,7 @@ export default {
 | 
				
			|||||||
      text-align: center;
 | 
					      text-align: center;
 | 
				
			||||||
      font-size: 28px;
 | 
					      font-size: 28px;
 | 
				
			||||||
      font-family: PingFangSC-Regular, PingFang SC;
 | 
					      font-family: PingFangSC-Regular, PingFang SC;
 | 
				
			||||||
      color: #CDDCF0;
 | 
					      color: #cddcf0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .active {
 | 
					    .active {
 | 
				
			||||||
@@ -243,7 +239,7 @@ export default {
 | 
				
			|||||||
      span {
 | 
					      span {
 | 
				
			||||||
        width: 48px;
 | 
					        width: 48px;
 | 
				
			||||||
        height: 4px;
 | 
					        height: 4px;
 | 
				
			||||||
        background: #FFF;
 | 
					        background: #fff;
 | 
				
			||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        bottom: 14px;
 | 
					        bottom: 14px;
 | 
				
			||||||
        left: 50%;
 | 
					        left: 50%;
 | 
				
			||||||
@@ -252,7 +248,6 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
  ::v-deep .AiCard {
 | 
					  ::v-deep .AiCard {
 | 
				
			||||||
    background: #f3f6f9;
 | 
					    background: #f3f6f9;
 | 
				
			||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
@@ -322,7 +317,7 @@ export default {
 | 
				
			|||||||
            display: inline-block;
 | 
					            display: inline-block;
 | 
				
			||||||
            padding: 0 16px;
 | 
					            padding: 0 16px;
 | 
				
			||||||
            line-height: 48px;
 | 
					            line-height: 48px;
 | 
				
			||||||
            background: #EEE;
 | 
					            background: #eee;
 | 
				
			||||||
            border-radius: 24px;
 | 
					            border-radius: 24px;
 | 
				
			||||||
            font-size: 24px;
 | 
					            font-size: 24px;
 | 
				
			||||||
            font-family: PingFangSC-Regular, PingFang SC;
 | 
					            font-family: PingFangSC-Regular, PingFang SC;
 | 
				
			||||||
@@ -348,9 +343,7 @@ export default {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .AiFixedBtn {
 | 
					  .AiFixedBtn {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user