Browse Source

Merge branch 'mergeBranch' into blueBranch

qymljy 2 months ago
parent
commit
298d040f7a

+ 8 - 1
src/WebsiteManagement/dataStatistics/modules/header.vue

@@ -27,15 +27,19 @@
       @change="pickerChange"
     >
     </el-date-picker>
+    <exportFile v-if="isExport" class="inline-16" style="margin-left: 10px" :param="param" :columns="columns" fileName="留言统计明细表"></exportFile>
   </div>
 </template>
 
 <script>
+import exportFile from '@/components/export_file/index5'
 export default {
   name: "header",
+  components:{exportFile},
   props: {
     title: String,
     subTitle: String,
+    isExport:Boolean,
     shortcutDate: {
       type: Array,
       default: () => [
@@ -54,6 +58,9 @@ export default {
       ],
     },
     returnWhere: Function,
+    param:Object,
+    columns:Object,
+    fileName:String
   },
   data() {
     return {
@@ -126,4 +133,4 @@ export default {
 /deep/ .el-date-editor .el-range__close-icon {
   width: 0 !important;
 }
-</style>
+</style>

+ 14 - 1
src/WebsiteManagement/dataStatistics/modules/statisticalAnalysisOfMessage.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="card">
-      <cord-top title="留言统计明细表" @returnWhere="getList" />
+      <cord-top title="留言统计明细表" @returnWhere="getList" :isExport="true" :param="param" :columns="tablecols" fileName="留言统计明细表" />
       <div style="height: 20px" />
       <tableTemplate
         ref="table"
@@ -30,6 +30,12 @@
             {{ $t(scope.column.data[scope.column.columnname]) }}
           </p>
         </template>
+        <template v-slot:opreation="scope">
+          <btnDelete btnType="text" btnTitle="删除" :disabled="scope.data.deleted == 0 || (scope.data.deleted == 1 && scope.data.allocationstatus == '已分配')"
+                     message="是否确定删除该留言?" confirmButtonText="确定删除" nameId="2025082010321603" nameKey="sat_orderclueids" :id="scope.data.sat_orderclueid"
+                     @deleteSuccess="getList(content)"
+          ></btnDelete>
+        </template>
       </tableTemplate>
       <div class="pagination-box">
         <el-pagination
@@ -50,11 +56,13 @@
 <script>
 import cordTop from "./header.vue";
 import tableTemplate from "@/views/salesData/components/table";
+import btnDelete from '@/components/btn-delete/indexDis'
 
 export default {
   components: {
     cordTop,
     tableTemplate,
+    btnDelete
   },
   data() {
     return {
@@ -68,6 +76,10 @@ export default {
         nocache: true,
         type: "近七日",
       },
+      param:{
+        id:'2025021108560703',
+        content:{}
+      }
     };
   },
   created() {
@@ -103,6 +115,7 @@ export default {
           this.content.total = res.total;
           this.content.pageNumber = res.pageNumber;
           this.content.pageSize = res.pageSize;
+          this.param.content = this.content
         });
     },
     handleSizeChange(pageSize) {

+ 50 - 0
src/components/btn-delete/indexDis.vue

@@ -0,0 +1,50 @@
+<template>
+  <div class="inline-16">
+    <el-button :type="btnType?btnType:'text'" size="mini" @click="open" :disabled="disabled">{{$t(btnTitle?btnTitle:'删除')}}</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:['btnType','btnTitle','message','confirmButtonText','cancelButtonText','isNumber','nameId','nameKey','id','disabled'],
+  data() {
+    return {
+      param: {
+        id: this.nameId,
+        content: {
+          // "sa_contractid": this.$route.query.id,
+          [this.nameKey]: [this.id],
+        },
+      },
+    };
+  },
+  methods:{
+    open() {
+      this.$confirm(this.$t(this.message), this.$t('提示'), {
+        confirmButtonText: this.$t(this.confirmButtonText?this.confirmButtonText:'确定'),
+        cancelButtonText: this.$t(this.cancelButtonText?this.cancelButtonText:'取消'),
+        type: 'warning'
+      }).then(() => {
+        this.onDel()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消删除')
+        });
+      });
+    },
+    async onDel(){
+      this.param.content[this.nameKey] = this.isNumber ? this.id : [this.id];
+      const res = await this.$api.requested(this.param)
+      this.tool.showMessage(res, () => {
+        this.$emit("deleteSuccess");
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>