From 4522ab3fe8bd45ee753ef187448c1e884bbc601f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 18 Apr 2024 11:09:27 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web

---
 src/views/property/inviteTenders.vue |   93 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 71 insertions(+), 22 deletions(-)

diff --git a/src/views/property/inviteTenders.vue b/src/views/property/inviteTenders.vue
index dbf86bb..13e8cc6 100644
--- a/src/views/property/inviteTenders.vue
+++ b/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,
@@ -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>
\ No newline at end of file

--
Gitblit v1.9.3