shuishen
2024-04-18 4522ab3fe8bd45ee753ef187448c1e884bbc601f
src/views/property/inviteTenders.vue
@@ -24,9 +24,10 @@
        </el-tag>
      </template>
      <template slot-scope="{ row, size }" slot="iscomment">
        <el-tag :size="size" :type="showStatus(row.iscomment, 2).type" v-text="showStatus(row.iscomment, 2).text">
        </el-tag>
      <template slot-scope="{ row }" slot="iscomment">
        <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'"
          :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc">
        </el-switch>
      </template>
    </avue-crud>
@@ -115,12 +116,12 @@
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 450,
          dialogMenuPosition: 'center',
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          border: false,
          border: true,
          //stripe:true,
          index: true,
          viewBtn: true,
@@ -134,6 +135,7 @@
              row: true,
              searchSpan: 4,
              search: true,
              searchLabelWidth: 76,
              rules: [{
                required: true,
                message: "请输入招标标题",
@@ -168,24 +170,22 @@
            //   }, ],
            // },
            {
              hide: true,
              parent: false,
              label: "招标范围",
              prop: "articleList",
              span: 12,
              minRows: 2,
              type: "cascader",
              multiple: true,
              tags: true,
              type: 'tree',
              dicData: [],
              props: {
                label: "name",
                value: 'id'
              },
              span: 12,
              rules: [{
                required: true,
                message: "请选择招标范围",
                trigger: "blur",
              }, ],
              props: {
                label: "name",
                value: 'id'
              },
              hide: true,
            },
            {
              width: 100,
@@ -194,7 +194,7 @@
              value: 2,
              slot: true,
              searchSpan: 4,
              search: true,
              // search: true,
              type: "select",
              rules: [{
                required: true,
@@ -235,6 +235,27 @@
            },
            {
              width: 110,
              label: "所属街道",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "streetName",
              search: true,
              searchSpan: 4
            },
            {
              width: 156,
              overHidden: true,
              label: "所属社区",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "communityName",
              search: true,
              searchSpan: 4
            },
            {
              width: 100,
              label: "发布状态",
              prop: "publish",
@@ -263,7 +284,10 @@
              label: "评论区",
              prop: "iscomment",
              slot: true,
              type: "select",
              type: "switch",
              activeColor: "#13ce66",
              inactiveColor: "#ccc",
              value: '1',
              dicData: [{
                  label: "关闭",
                  value: "0",
@@ -459,6 +483,14 @@
      }
    },
    methods: {
      iscommentInput(e, data) {
        upcomment(data.id, e).then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          })
        })
      },
      openDilog(row, type) {
        this.dialogVisibles = true
@@ -513,7 +545,10 @@
          })
          row.url = urls.join(",")
        }
        add(row).then(
        add({
          ...row,
          districtId: row.articleList
        }).then(
          () => {
            this.onLoad(this.page)
            this.$message({
@@ -540,7 +575,10 @@
          row.url = urls.join(",")
        }
        update(row).then(
        update({
          ...row,
          district_id: row.articleList
        }).then(
          () => {
            this.onLoad(this.page)
            this.$message({
@@ -650,12 +688,13 @@
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            startTime: dateTime[0] + ' 00:00:01',
            endTime: dateTime[1] + ' 23:59:59',
            ...this.query,
          }
          values.dateTime = null
        }
        values.type = 2
        this.loading = true
        console.log(values)
@@ -676,7 +715,9 @@
          this.loading = false
          this.selectionClear()
        })
        getDistrictTree(params = {}).then((res) => {
        getDistrictTree({
          filterFlag: 1
        }).then((res) => {
          const data = res.data.data
          this.districtTree = data
          const column = this.findObject(this.option.column, "articleList")
@@ -760,8 +801,16 @@
  }
</script>
<style>
<style lang="scss" scoped>
  .avue-upload__icon {
    line-height: 6;
  }
  :deep(.avue-form__menu--center) {
    text-align: left;
  }
  :deep(.avue-form__menu--center .el-button) {
    margin: 0 5px 0 0;
  }
</style>