rkljw 4 dagar sedan
förälder
incheckning
1fbb5e9f22

+ 17 - 0
src/router/index.js

@@ -599,6 +599,23 @@ export const constantRoutes = [
       }
     ]
 
+  },
+  {
+    path: '/addNcomplaint',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/news/addNcomplaint'),
+        meta: {
+          title: '添加投诉举报',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+
   },
       
   // ----------liuj------------

+ 51 - 1
src/store/modules/news.js

@@ -3,7 +3,7 @@ import { getArticleList, addArticle, delArticle, getArticleInfo, updateArticle,
   getGoodInfo, updateGood, websiteList, getWebsiteNavList, getWebsiteNavPool, getWebsiteNavPoolSite,
   getSurveyList,getSurveyInfo, getJobHuntingList, getJobHuntingInfo,addJobHunting,delJobHunting,updateJobHunting,getJobHuntingData,
   getComplaintList,
-  getComplaintInfo, updateComplaint, deleteComplaint,  addComplaint1,  getMSG,  getNoticeList, getNoticeInfo, addNotice, updateNotice, deleteNotice,
+  getComplaintInfo, updateComplaint, deleteComplaint,  addComplaint1,    getMSG,  getNoticeList, getNoticeInfo, addNotice, updateNotice, deleteNotice,
   updateGoodStatus, updateJobHuntingStatus, updateNoticeStatus, updateComplaintStatus,
 } from '@/api/news'
 
@@ -252,6 +252,56 @@ const actions = {
       })
     })
   },
+  getComplaintList({ commit }, data) {
+    return new Promise((resolve, reject) => {
+      getComplaintList(data).then(response => {
+        resolve(response)
+      }).catch(error => {
+        reject(error)
+      })
+    }) 
+  }
+,
+  getComplaintInfo({ commit }, data) {
+    return new Promise((resolve, reject) => {
+      getComplaintInfo(data).then(response => {
+        resolve(response)
+      }).catch(error => {
+        reject(error)
+      })
+    })
+  },
+  updateComplaint({ commit }, data) {
+   
+    return new Promise((resolve, reject) => {
+      updateComplaint(data).then(response => {
+        resolve(response)
+      }).catch(error => {
+        reject(error)
+ 
+      }) 
+    })
+  }
+,
+  deleteComplaint({ commit }, data) {
+    return new Promise((resolve, reject) => {
+      deleteComplaint(data).then(response => {
+        resolve(response)
+      }).catch(error => {
+        reject(error)
+      })
+    })
+  },
+  addComplaint({ commit }, data) {
+    
+    return new Promise((resolve, reject) => {
+      addComplaint(data).then(response => {
+        resolve(response)
+      }).catch(error => {
+        reject(error)
+      })
+    })
+  },
   //20250306  求职信息
 
 

+ 4 - 3
src/utils/baseUrl.js

@@ -5,9 +5,10 @@ const URL = {
   //baseUrl: 'http://admindev.bjzxtw.org.cn:9501',//测试域名
   //baseUrl: 'http://116.131.8.26:9501',//pre环境ip
   //baseUrl: 'http://adminpre.bjzxtw.org.cn:9501',//pre环境域名
-  webUrl:'adminpre.bjzxtw.org.cn',//管理系统地址,如果用户因为某种原因以外退出,需要一个userurl用于请求接口
-  // baseUrl: 'http://apipre1.bjzxtw.org.cn:29501',//pre环境域名2
-  baseUrl: 'http://192.168.1.201:9501',//刘佳伟本地环境
+
+  webUrl: 'adminpre.bjzxtw.org.cn',//管理系统地址,如果用户因为某种原因以外退出,需要一个userurl用于请求接口
+  baseUrl: 'http://apipre1.bjzxtw.org.cn:29501',//pre环境域名2
+  // baseUrl: 'http://192.168.1.201:9501',//刘佳伟本地环境
   //baseUrl:'http://192.168.1.115:9501',//冯蕊的本地环境
   //baseUrl: 'http://192.168.1.125:9501',//刘剑的本地环境
   //WebsocketUrl: 'ws://192.168.1.201:9506',//刘佳伟 -- websocket地址

+ 1100 - 0
src/views/advertise/advertiseList - 副本.vue

@@ -0,0 +1,1100 @@
+<template>
+    <!-- 广告列表 -->
+    <div>
+        <!-- 提示信息 -->
+        <div class="tips">
+            <el-row>
+                <el-col :span="24">
+                    <i class="tipsIcon"></i>
+                    <span class="tipsText">24小时内,若运营没有操作用户的申请,则用户申请的时间、信息等将会释放。</span>
+                </el-col>
+            </el-row>
+        </div>
+        <!-- 头部搜索框部分 -->
+        <div class="title">
+            <el-row>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">工单编号</div>
+                        <el-input class="input" v-model="order_code" clearable placeholder="请输入工单编号"></el-input>
+                    </div>
+                </el-col>
+
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">订单状态</div>
+                        <el-select v-model="order_status" clearable placeholder="请选择订单状态">
+                            <el-option v-for="item in order" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </el-col>
+
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">广告尺寸</div>xx
+                        <el-select v-model="advert_rule_model" clearable placeholder="请选择广告尺寸">
+                            <el-option v-for="item in advert_arr" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </div>xx
+                </el-col>
+
+
+
+                <el-col :span="8" class="right">
+                    <div class="btnList">
+                        <button class="search" @click="goSearch">搜索</button>
+                        <button class="reset" @click="goReset">重置</button>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <el-row>
+                <template>
+                    <el-table class="my-table" :data="tableData" style="width: 100%">
+                        <el-table-column fixed prop="id" label="编号" width="80">
+                        </el-table-column>
+                        <el-table-column prop="order_num" label="工单编号" width="175">
+                        </el-table-column>
+                        <el-table-column prop="name" label="广告名称" width="160">
+                        </el-table-column>
+                        <el-table-column prop="orderStatus" label="订单状态" width="100">
+                        </el-table-column>
+                        <el-table-column prop="sttime" label="开始时间" width="">
+                        </el-table-column>
+                        <el-table-column prop="edtime" label="结束时间" width="">
+                        </el-table-column>
+                        <el-table-column prop="cttime" label="创建时间" width="">
+                        </el-table-column>
+                        <el-table-column prop="price" label="总金额" width="110">
+                        </el-table-column>
+                        <el-table-column fixed="right" label="操作" width="330">
+                            <template slot-scope="scope">
+                                <div class="listBtnBox">
+                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id)"><i
+                                            class="el-icon-delete"></i>删除</div>
+                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
+                                            class="el-icon-edit-outline"></i>编辑</div>
+                                    <div class="listReviewBtn" @click="goReview(scope.row.id, scope.row)"><i
+                                            class="review"></i>审核</div>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </template>
+            </el-row>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+
+        <!-- 弹出框 编辑 start----------------------------------------------------------->
+        <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="56%" top="8vh">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <div class="dialogText">
+                    <el-form-item label="广告名称:" prop="">
+                        <el-input v-model="ruleForm.name" disabled placeholder="请输入网站名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="广告网址:" prop="">
+                        <el-input v-model="ruleForm.ad_url" disabled placeholder="请输入网站名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="广告图:" prop="">
+                        <div class="adImage">
+                            <img :src="ruleForm.adImg" v-if="this.ruleForm.adImg" alt="">
+                            <img :src="'../../assets/advertise/404.png'" v-else-if="this.ruleForm.adImg = ''" alt="">
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="持续时间:" prop="">
+                        <el-date-picker v-model="ruleForm.time" type="datetimerange" range-separator="至"
+                            start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd HH:mm:ss"
+                            value-format="yyyy-MM-dd HH:mm:ss" :picker-options="startTimeOptions"
+                            @change="changeStartTime">
+                        </el-date-picker>
+                        <!-- <el-col :span="11">
+                            <el-date-picker v-model="ruleForm.startTime" type="datetime" placeholder="选择日期时间"
+                                format="yyyy-MM-dd HH:00:00" value-format="yyyy-MM-dd HH:00:00"
+                                :picker-options="startTimeOptions" @change="changeStartTime">
+                            </el-date-picker>
+                        </el-col>
+                        <el-col :span="2" class="zhi">
+                            至
+                        </el-col>
+                        <el-col :span="11">
+                            <el-date-picker v-model="ruleForm.endTime" type="datetime" placeholder="选择日期时间"
+                                format="yyyy-MM-dd HH:00:00" value-format="yyyy-MM-dd HH:00:00"
+                                :picker-options="endTimeOptions">
+                            </el-date-picker>
+                        </el-col> -->
+                    </el-form-item>
+                    <el-form-item label="广告尺寸:" prop="">xx
+                        <el-radio v-model="ruleForm.radio" v-for="(item,index) in adSizeList" :key="index" disabled :label=item.id>{{ item.width+'x'+item.height }}</el-radio>
+                    </el-form-item>
+
+                    <el-form-item label="价格:" prop="price">
+                        <div class="price">
+                            <el-col :span="6">
+                                <el-input v-model="ruleForm.price" placeholder="请输入价格"></el-input>
+                            </el-col>
+                            <el-col :span="2" class="zhi">
+                                元 x
+                            </el-col>
+                            <el-col :span="6">
+                                <el-input v-model="ruleForm.days" disabled placeholder="请输入天数"></el-input>
+                            </el-col>
+                            <el-col :span="2" class="zhi">
+                                天 x
+                            </el-col>
+                            <el-col :span="6">
+                                <el-input v-model="ruleForm.num" disabled placeholder="请输入个数"></el-input>
+                            </el-col>
+                            <el-col :span="2" class="zhi">
+                                个
+                            </el-col>
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="广告位置:" prop="">
+                        <span class="example" @click="goGraph">查看示例图</span>
+                        <div>
+                            <el-button disabled v-for="item in ruleForm.adPlace" class="el_btnList">{{ item
+                            }}</el-button>
+                        </div>
+                    </el-form-item>
+                </div>
+                <div class="dialogBtn">
+                    <button class="cancel" @click="cancelForm">取消</button>
+                    <button class="submit" @click="submitForm">提交</button>
+                </div>
+            </el-form>
+        </el-dialog>
+        <!-- 弹出框 编辑 end----------------------------------------------------------->
+
+        <!-- 弹出框 广告位示例图 start----------------------------------------------------------->
+        <el-dialog title="广告位示例图" :visible.sync="dialogVisible" width="60%" top="10vh">
+            <div class="graph">
+                <el-carousel indicator-position="outside" autoplay loop>
+                    <el-carousel-item>
+                        <img src="../../assets/advertise/001.png" alt="" class="shilitu">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="../../assets/advertise/002.png" alt="" class="shilitu">
+                    </el-carousel-item>
+                </el-carousel>
+            </div>
+        </el-dialog>
+        <!-- 弹出框 广告位示例图 end----------------------------------------------------------->
+
+        <!-- 弹出框 审核 start----------------------------------------------------------->
+        <el-dialog title="审核状态" :visible.sync="dialogFormVisible" width="35%" top="25vh">
+            <template slot="title">
+                <div style="display: flex; align-items: center;">
+                    <span>审核状态</span>
+                    <span class="redTips">(确定后,审核状态不可再次更改.请确认好再审核)</span>
+                </div>
+            </template>
+            <el-form ref="form" :model="form" label-width="80px">
+                <div class="radioGroup">
+                    <el-radio-group v-model="status_radio">
+                        <el-radio :label="3">通过</el-radio>
+                        <el-radio :label="6">驳回</el-radio>
+                    </el-radio-group>
+                    <el-form-item v-show="this.status_radio == 6" label="驳回原因:" :label-width="formLabelWidth"
+                        prop="name">
+                        <el-input v-model="textarea" type="textarea" resize="none" :rows="3" placeholder="请输入内容">
+                        </el-input>
+                    </el-form-item>
+                </div>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="dialogFormVisible = false">取 消</el-button>
+                <el-button type="primary" @click="subimtStatus">确 定</el-button>
+            </div>
+        </el-dialog>
+        <!-- 弹出框 审核 end----------------------------------------------------------->
+    </div>
+
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle.vue';
+
+//引入公用样式
+import '@/styles/global.less';
+import { getStatus, getOrderList, getOrderListAdmin, getOrderDetail, getOrderDetailAdmin, applyOrderStatusAdmin, editOrderAdmin, rejectOrderAdmin, endOrderAdmin, delOrderAdmin,getSize } from '@/api/advertise'
+export default {
+    components: {
+        tableTitle,//表格标题-
+    },
+    data() {
+        return {
+            tableDivTitle: "广告列表",  //列表标题
+            dialogTableVisible: false,      //编辑弹框
+            dialogName: '编辑', //编辑弹窗名称
+            dialogFormVisible: false,     //审核弹框
+            dialogVisible: false,  //示例图弹窗
+            form: {},  //审核状态的ref属性名称
+            tableData: [],//表格数据
+            ad_img: 'http://183.131.25.186:9501/image/20250102/1735810611310322.png', //广告图
+            // 搜索框相关
+            order_code: '', //工单编号 
+            order_status: '',//订单状态
+            order: [ //订单状态数据
+                {
+                    value: 1,
+                    label: '已通过'
+                },
+                {
+                    value: 2,
+                    label: '已驳回'
+                },
+                {
+                    value: 3,
+                    label: '已取消'
+                },
+                {
+                    value: 5,
+                    label: '已过期'
+                },
+                {
+                    value: 6,
+                    label: '待审核'
+                },
+                {
+                    value: 7,
+                    label: '已完成'
+                }
+            ],
+
+            advert_rule_model:"",    
+            advert_arr: [ //广告尺寸xx
+                {
+                    value: 1,
+                    label: '1已通过'
+                },
+                {
+                    value: 2,
+                    label: '2已驳回'
+                } 
+            ],
+
+
+            //活动id
+            activeid: "",
+            // 分页相关
+            page: 1,
+            pageSize: 10,
+            total: 0,
+            orderads: [],
+            // 审核弹窗相关
+            status_radio: "",   //审核状态
+            textarea: '',    //驳回原因
+            formLabelWidth: '',
+            adSizeList: '', //广告尺寸
+            ruleForm: {
+                name: '', //广告名称xx
+                ad_url: '', //广告网址
+                adImg: '', //广告图
+                radio: '',//广告尺寸
+                time: [], //持续时间
+                startTime: '', //开始时间
+                endTime: '',   //结束时间
+                price: '',  //价格
+                days: '',   //天数
+                num: '',   //个数
+                adPlace: [] //广告位
+            },
+            rules: {
+                name: [
+                    { required: true, message: '请输入网站名称', trigger: 'blur' },
+                ],
+                price: [
+                    { required: true, message: '请输入要修改的价格', trigger: 'change' }
+                ]
+            },
+            //时间选择器
+            //日期选择器方法
+            startTimeOptions: {
+                disabledDate(time) {
+                    return time.getTime() < Date.now() - 8.64e7; // 禁用今天之前的日期
+                }
+            },
+            endTimeOptions: {
+                disabledDate(time) {
+                    return time.getTime() < Date.now() - 8.64e7; // 禁用今天之前的日期
+                }
+            },
+        }
+    },
+    methods: {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        //1.1 开始请求列表信息方法
+        getData() {
+            if (this.order_code == '' || this.order_status == '') {
+
+                let data = new FormData()
+                data.append('page', this.page)
+                data.append('pageSize', this.pageSize)
+                data.append('status', this.order_status)
+                data.append('order_num', this.order_code)
+
+                getOrderListAdmin(data).then(data => {
+                    console.log(data);
+                    this.tableData = data.data.rows
+                    this.total = data.data.count1
+                    for (let item of this.tableData) {
+                        if (item.status == 1) {
+                            item.orderStatus = '已通过'
+                        } else if (item.status == 7) {
+                            item.orderStatus = '已完成'
+                        } else if (item.status == 2) {
+                            item.orderStatus = '已驳回'
+                        } else if (item.status == 3) {
+                            item.orderStatus = '已取消'
+                        } else if (item.status == 5) {
+                            item.orderStatus = '已过期'
+                        } else if (item.status == 6) {
+                            item.orderStatus = '待审核'
+                        }
+                    }
+                })
+            } else {
+
+                let data = new FormData()
+                data.append('page', this.page)
+                data.append('pageSize', this.pageSize)
+                console.log(data);
+                getOrderListAdmin(data).then(data => {
+                    console.log("getOrderListAdmin", data);
+                    this.tableData = data.data.rows
+                    this.total = data.data.count1
+                    for (let item of this.tableData) {
+                        if (item.status == 1) {
+                            item.orderStatus = '已通过'
+                        } else if (item.status == 7) {
+                            item.orderStatus = '已完成'
+                        } else if (item.status == 2) {
+                            item.orderStatus = '已驳回'
+                        } else if (item.status == 3) {
+                            item.orderStatus = '已取消'
+                        } else if (item.status == 5) {
+                            item.orderStatus = '已过期'
+                        } else if (item.status == 6) {
+                            item.orderStatus = '待审核'
+                        }
+                    }
+                })
+            }
+
+        },
+
+        //1.2 删除内容
+        deleteRow(id) {
+            console.log(id);
+            let data = new FormData()
+            data.append('id', id)
+
+            this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+            }).then(() => {
+                console.log("当前删除:" + id)
+                let data = new FormData()
+                data.append('id', id)
+                console.log(data);
+
+                delOrderAdmin(data).then(data => {
+                    console.log(data);
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                    if (data.code == 200) {
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        });
+                    }
+                    this.getData()
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'warning',
+                    message: '已取消删除'
+                });
+            });
+        },
+        //1.3 查看示例图
+        goGraph() {
+            this.dialogVisible = true
+        },
+
+        //1.4 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.5 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        // 1.6 搜索按钮xx
+        goSearch() {
+            console.log(this.status);
+
+            let data = new FormData()
+            data.append('page', this.page)
+            data.append('pageSize', this.pageSize)
+            data.append('status', this.order_status)
+            data.append('order_num', this.order_code)
+            console.log(data);
+
+            getOrderListAdmin(data).then(data => {
+                console.log(data);
+                this.tableData = data.data.rows
+                this.total = data.data.count1
+                for (let item of this.tableData) {
+                    if (item.status == 1) {
+                        item.orderStatus = '已通过'
+                    } else if (item.status == 7) {
+                        item.orderStatus = '已完成'
+                    } else if (item.status == 2) {
+                        item.orderStatus = '已驳回'
+                    } else if (item.status == 3) {
+                        item.orderStatus = '已取消'
+                    } else if (item.status == 5) {
+                        item.orderStatus = '已过期'
+                    } else if (item.status == 6) {
+                        item.orderStatus = '待审核'
+                    }
+                }
+            })
+        },
+        //1.7 重置按钮
+        goReset() {
+            this.order_code = ''
+            this.order_status = ''
+            this.page = 1
+            this.pageSize = 10
+            this.getData();
+        },
+        //列表和分页相关 end ------------------------------------------------------------>
+
+        //1.9 编辑
+        goEdit(id, val) {
+            console.log(id, val);
+            this.activeid = id
+            this.dialogTableVisible = true
+            this.ruleForm.name = val.name
+            if (val.width == 1200 && val.height == 90) {
+                this.ruleForm.radio = 1
+            } else if(val.width == 830 && val.height == 110) {
+                this.ruleForm.radio = 2
+            } else if(val.width == 450 && val.height == 290) {
+                this.ruleForm.radio = 3
+            }
+            this.ruleForm.startTime = val.sttime
+            this.ruleForm.endTime = val.edtime
+            this.ruleForm.days = val.days
+
+            let data = new FormData()
+            data.append('id', id)
+
+            //查看列表详情
+            getOrderDetailAdmin(data).then(data => {
+                // console.log('详情', data);
+                console.log('详情', data.data.ad[0]?.image_url);
+
+                this.ruleForm.ad_url = data.data.ad[0]?.image_url //广告链接
+                this.ruleForm.adImg = data.data.ad[0]?.image_src //广告图
+                this.ruleForm.num = data.data.ad.length //广告个数
+                this.ruleForm.price = val.price / val.days / this.ruleForm.num //广告价格
+                this.ruleForm.startTime = val.sttime//持续时间开始
+                this.ruleForm.endTime = val.edtime//持续时间结束
+                this.ruleForm.time = [val.sttime, val.edtime] //持续时间
+
+                let adPlace = data.data.ad
+
+                this.ruleForm.adPlace = []
+
+                for (let item of adPlace) {
+                    this.ruleForm.adPlace.push(item.ad_name)//广告位名称
+                }
+                console.log(this.ruleForm.adPlace);
+            })
+        },
+
+        //2.0 审核
+        goReview(id, val) {
+            this.activeid = id
+            this.activeid = id
+            if (val.status != 6) {
+                this.$message({
+                    message: '该广告已经审核,不能再次审核',
+                    type: 'warning'
+                })
+                this.dialogFormVisible = false
+            } else {
+                this.dialogFormVisible = true
+            }
+        },
+
+        //审核中的确定
+        subimtStatus() {
+            if (this.status_radio == '3') {
+                let data = new FormData()
+                data.append('id', this.activeid)
+                applyOrderStatusAdmin(data).then(data => {
+                    console.log(data);
+                    if (data.code == 200) {
+                        this.$message({
+                            message: '已修改审核状态',
+                            type: 'success'
+                        })
+                        this.dialogFormVisible = false
+                        this.getData()
+                    }
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                })
+            }
+            if (this.status_radio == '6') {
+                let data = new FormData()
+                data.append('id', this.activeid)
+                data.append('reason', this.textarea)
+                rejectOrderAdmin(data).then(data => {
+                    console.log(data);
+                    if (data.code == 200) {
+                        this.$message({
+                            message: '修改成功',
+                            type: 'success'
+                        })
+                        this.dialogFormVisible = false
+                        this.getData()
+                    }
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                })
+            }
+
+        },
+        // 弹出层相关方法
+        // 提交表单
+        submitForm() {
+            let total = this.ruleForm.price * this.ruleForm.days * this.ruleForm.num
+            let data = new FormData()
+            data.append('id', this.activeid)
+            data.append('price', total.toFixed(2))
+            data.append('sttime', this.ruleForm.startTime)
+            data.append('edtime', this.ruleForm.endTime)
+            editOrderAdmin(data).then(data => {
+                console.log(data);
+                if (data.code == 200) {
+                    this.dialogTableVisible = false
+                    this.$message({
+                        message: '修改成功',
+                        type: 'success'
+                    })
+                    this.getData()
+                }
+                if (data.code == 0) {
+                    this.$message({
+                        message: data.message,// + ',需要保留两位小数',
+                        type: 'error'
+                    })
+                }
+            })
+        },
+        //获取天数
+        getDays() {
+            let total = this.ruleForm.price * this.ruleForm.days * this.ruleForm.num
+            let data = new FormData()
+            data.append('id', this.activeid)
+            data.append('price', total.toFixed(2))
+            data.append('sttime', this.ruleForm.startTime)
+            data.append('edtime', this.ruleForm.endTime)
+            editOrderAdmin(data).then(data => {
+                console.log(data);
+                // if (data.code == 200) {
+                //     // this.dialogTableVisible = false
+                //     this.$message({
+                //         message: '修改成功',
+                //         type: 'success'
+                //     })
+                //     this.getData()
+                // }
+                // if (data.code == 0) {
+                //     this.$message({
+                //         message: data.message,// + ',需要保留两位小数',
+                //         type: 'error'
+                //     })
+                // }
+            })
+        },
+        //取消添加或编辑
+        cancelForm() {
+            this.dialogTableVisible = false
+        },
+        // 时间选择器相关方法
+        changeStartTime(val) {
+            // console.log('1111111111111111111', val);
+
+            // 先格式化传入的时间,选择的时间为下一个整数小时 0 分 0 秒
+            let time1 = new Date(new Date(val[0]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+            let time2 = new Date(new Date(val[1]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+            // 同样的道理,获取当前时间的下一个整数小时 0 分 0 秒
+            let currentTimestamp = new Date(new Date().setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
+
+            if (time1 < currentTimestamp) {
+                this.$message.error('时间选择错误,已为您自动重设!');
+                // 第一步,将时间戳转换为本地时间
+                let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
+                    year: 'numeric',
+                    month: '2-digit',
+                    day: '2-digit',
+                    hour: '2-digit',
+                    minute: '2-digit',
+                    second: '2-digit'
+                }).replace(/\//g, '-');
+                // 第二步,将当前时间加 24 小时
+                let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
+                    year: 'numeric',
+                    month: '2-digit',
+                    day: '2-digit',
+                    hour: '2-digit',
+                    minute: '2-digit',
+                    second: '2-digit'
+                }).replace(/\//g, '-');
+
+                // 第三步,将当前时间赋值给 ruleForm.time[0]
+
+                this.ruleForm.time[0] = localTime;
+                this.ruleForm.time[1] = twoHoursLocalTime;
+                this.ruleForm.startTime = localTime;
+                this.ruleForm.endTime = twoHoursLocalTime;
+
+                const time1 = new Date(this.ruleForm.endTime);
+                const time2 = new Date(this.ruleForm.startTime);
+                const diff = time1.getTime() - time2.getTime();
+                this.ruleForm.days = diff / (1000 * 60 * 60 * 24);
+
+
+            } else {
+                // 第二种情况,传入的时间戳大于当前时间
+                // 但是时间间隔小于 24 小时
+                if (time2 - time1 < 24 * 60 * 60 * 1000) {
+                    this.$message.error('广告持续时间不得低于 24 小时,已为您自动重设!');
+                    // 第一步,将时间戳转换为本地时间
+                    let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
+                        year: 'numeric',
+                        month: '2-digit',
+                        day: '2-digit',
+                        hour: '2-digit',
+                        minute: '2-digit',
+                        second: '2-digit'
+                    }).replace(/\//g, '-');
+                    // 第二步,将当前时间加 24 小时
+                    let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
+                        year: 'numeric',
+                        month: '2-digit',
+                        day: '2-digit',
+                        hour: '2-digit',
+                        minute: '2-digit',
+                        second: '2-digit'
+                    }).replace(/\//g, '-');
+
+
+                    // 第三步,将当前时间赋值给 ruleForm.time[0]
+                    this.ruleForm.time[0] = localTime;
+                    this.ruleForm.time[1] = twoHoursLocalTime;
+                    this.ruleForm.startTime = localTime;
+                    this.ruleForm.endTime = twoHoursLocalTime;
+
+                    const time1 = new Date(this.ruleForm.endTime);
+                    const time2 = new Date(this.ruleForm.startTime);
+                    const diff = time1.getTime() - time2.getTime();
+                    this.ruleForm.days = diff / (1000 * 60 * 60 * 24);
+
+                } else {
+                    // 第三种情况,用户时间选择正确,无需操作
+                    this.ruleForm.startTime = val[0];
+                    this.ruleForm.endTime = val[1];
+
+                    const time1 = new Date(this.ruleForm.endTime);
+                    const time2 = new Date(this.ruleForm.startTime);
+                    const diff = time1.getTime() - time2.getTime();
+                    this.ruleForm.days = diff / (1000 * 60 * 60 * 24);
+
+                }
+            }
+
+            // 第四种情况,使广告立即生效,请注释上面的 if 直接使用下面这一段
+            // this.ruleForm.startTime = val[0];
+            // this.ruleForm.endTime = val[1];
+            // // 获取广告尺寸
+            // this.getAdSize();
+            // // 创建购物车
+            // axios.post("/order/addShoppingCart").then(response => {
+            //   // console.log("创建购物车", response.data);
+            //   this.shopCode = response.data;
+            //   console.log('shopCode', this.shopCode);
+            // });
+        },
+        getAdSize() {
+
+            getSize().then(res => {
+            //     console.log("广告尺寸==", res.data);
+                this.adSizeList = res.data;
+                 
+                for(let item of this.adSizeList){
+                      ad_size=item.width+'x'+item.height;
+                } 
+            })
+        },
+
+        getAdSize_2() {//xx
+            getSize().then(res => {
+            //     console.log("广告尺寸==", res.data);
+                this.advert_arr = res.data;
+                console.log("this.advert_arr===1", this.advert_arr)  
+                for(var i=0;i<this.advert_arr.length;i++){
+                        this.advert_arr[i]={value:i,label:this.advert_arr[i].width+'x'+this.advert_arr[i].height}
+                        console.log("this.advert_arr===2",this.advert_arr[i])
+                   
+                } 
+                 
+            })}
+
+    },
+    mounted() {
+        this.getAdSize()
+        this.getAdSize_2()
+        this.getData()
+    },
+}
+</script>
+
+<style scoped lang="less">
+.redTips {
+    color: red;
+    display: inline-block;
+    margin-left: 20px;
+    font-size: 14px;
+}
+
+// 提示信息
+.tips {
+    margin: 30px;
+    background-color: #e9ecf9;
+    border-radius: 11px;
+
+    .tipsIcon {
+        margin: 10px 15px;
+        display: inline-block;
+        width: 24px;
+        height: 24px;
+        background: url("../../assets/advertise/Info Circle.png") no-repeat;
+        vertical-align: middle;
+    }
+
+    .tipsText {
+        font-size: 14px;
+        color: #666666;
+    }
+}
+
+// 头部
+.title {
+    margin: 30px 30px 20px 30px;
+    padding: 30px 30px 40px 30px;
+    background-color: #fff;
+    border-radius: 20px 20px 20px 20px;
+    border: 1px solid #E9EDF7;
+
+    .left {
+        float: left;
+    }
+
+    .right {
+        float: right;
+    }
+
+
+    .searchBox {
+        ::v-deep .el-input {
+            position: relative;
+            font-size: 14px;
+            display: inline-block;
+            width: 90%;
+        }
+
+        .searchTitle {
+            padding-bottom: 10px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 14px;
+            color: #999999;
+            line-height: 16px;
+        }
+
+        .el-select {
+            width: 100%;
+            display: inline-block;
+            position: relative;
+        }
+    }
+
+
+    .btnList {
+        float: right;
+        padding-top: 28px;
+
+        button {
+            height: 38px;
+            border: none;
+            border-radius: 8px;
+            padding: 0 20px;
+        }
+
+        .search {
+            background-color: #5570f1;
+            color: #fff;
+            margin-right: 20px;
+        }
+
+        .reset {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 16px;
+            color: #333333;
+            background: #F5F7FB;
+            border-radius: 8px 8px 8px 8px;
+            border: 1px solid rgba(85, 112, 241, 0.11);
+        }
+    }
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+    .btn {
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        height: 38px;
+        color: #fff;
+        background-color: #5570f1;
+        border: none;
+        border-radius: 8px;
+        padding: 8px 28px 9px;
+        box-sizing: border-box;
+    }
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+
+    .listDeleteBtn,
+    .listEditBtn,
+    .listReviewBtn {
+        margin-left: 0px;
+        padding-left: 0px;
+        margin-right: 20px;
+        width: 76px;
+        height: 36px;
+        line-height: 36px;
+    }
+
+
+    .listReviewBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #519C66;
+        background-color: rgba(81, 156, 102, 0.16);
+
+        >.review {
+            display: inline-block;
+            width: 20px;
+            height: 20px;
+            background: url("../../assets/advertise/Shield.png");
+            margin-right: 6px;
+            vertical-align: -6px;
+        }
+    }
+
+    ::v-deep .el-form-item {
+        margin-bottom: 50px;
+    }
+
+    ::v-deep .el-select {
+        width: 100%;
+    }
+
+    ::v-deep .el-input--medium,
+    ::v-deep .el-form-item__label {
+        line-height: 36px;
+        font-size: 16px;
+    }
+}
+
+// 弹出层内容
+.dialogText {
+    margin: 0 7px 0 3px;
+    padding-bottom: 1px;
+    padding: 0px 60px 1px 20px;
+
+    .zhi {
+        text-align: center;
+    }
+
+    .adImage {
+        width: 140px;
+        height: 140px;overflow:hidden;
+        // line-height: 210px;
+        border-radius: 12px;
+        border: 1px solid rgba(85, 112, 241, 0.11);
+
+        img {
+            display:block;
+            height:100%;width:100%;
+
+            //width: 140px;
+            // height: 80px;
+        }
+    }
+
+    // .price {
+    //     ::v-deep .el-input {
+    //         width: 29%;
+    //     }
+    // }
+
+    .example {
+        font-family: Microsoft YaHei;
+        color: #5570F1;
+    }
+
+    .el_btnList {
+        margin-right: 15px;
+        margin-top: 20px;
+    }
+
+    //日期时间选择器的宽
+    ::v-deep .el-date-editor.el-input {
+        width: 100%;
+    }
+
+    ::v-deep .el-button+.el-button {
+        margin-left: 0px;
+    }
+
+    ::v-deep .el-range-editor.el-input__inner {
+        width: 100%;
+    }
+}
+
+// 弹出层按钮
+.dialogBtn {
+    text-align: center;
+    margin: 50px auto 20px;
+
+    button {
+        width: 184px;
+        padding: 16px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        border: none;
+        border-radius: 12px 12px 12px 12px;
+    }
+
+    // 取消
+    .cancel {
+        color: #333333;
+        background-color: #f5f7fb;
+        border: 2px solid rgba(85, 112, 241, 0.11);
+    }
+
+    // 提交
+    .submit {
+        color: #fff;
+        background-color: #5570F1;
+        margin-left: 40px;
+    }
+}
+
+//审核弹出框
+.radioGroup {
+    ::v-deep .el-form-item {
+        margin-top: 40px;
+        margin-bottom: 0;
+    }
+}
+
+.graph {
+    width: 100%;
+    margin: 0 auto;
+    overflow: hidden;
+
+    .shilitu {
+        width: 100%;
+        height: 600px;
+        z-index: 100000;
+    }
+
+}
+
+
+::v-deep .el-carousel__container {
+    position: relative;
+    height: 600px;
+}
+
+/* 自定义指示器样式 */
+::v-deep .el-carousel__indicators .el-carousel__indicator button {
+    width: 12px;
+    /* 宽度 */
+    height: 12px;
+    /* 高度 */
+    border-radius: 50%;
+    /* 圆形 */
+}
+
+/* 可选:更改当前项指示器的颜色 */
+::v-deep .el-carousel__indicators .el-carousel__indicator.is-active button {
+    background-color: #33b023;
+    /* 当前项颜色 */
+}
+
+.dialog-footer {
+    margin: 0 auto;
+}
+</style>

+ 15 - 12
src/views/news/addGood.vue

@@ -135,9 +135,11 @@
             <!--这里是富文本-->
             <myEditor ref="myEditor" v-model="form.detail"></myEditor>
           </el-form-item>
-          <el-form-item label="浏览量:" prop="hits" class="custom-align-right">
+
+          <el-form-item v-if="user_type == 10000" label="浏览量:" prop="hits" class="custom-align-right">
             <el-input type="number" v-model="form.hits" autocomplete="off" placeholder="请输入浏览量"></el-input>
           </el-form-item>
+
           <el-form-item label="联系人:" prop="contact" class="custom-align-right">
             <el-input v-model="form.contact" autocomplete="off" placeholder="请输入联系人"></el-input>
           </el-form-item>
@@ -473,11 +475,11 @@ export default {
         console.log(res)
         this.userType = res.data.type_id;
         this.user_type = res.data.type_id;
-        
+
         if (this.userType != 10000) {
-          this.form.website_id = getWebSiteId() 
+          this.form.website_id = getWebSiteId()
         }
-       
+
         //if(res.data.type_id==10000){}//管理员
         //if(res.data.type_id==4){}//调研员
         //个人会员=1 政务会员=2 企业会员=3 调研员=4 管理员=10000 游客=20000
@@ -524,9 +526,9 @@ export default {
     },
     //1.2 提交表单
     addToServe() {
-      
+
       this.form.website_id = getWebSiteId();
-      console.log("提交时获取网站id:",this.form.website_id)
+      console.log("提交时获取网站id:", this.form.website_id)
       //先进行验证
       this.$refs.form.validate(valid => {
         console.log(this.form.validity, 'this.form.validity-----------------')
@@ -770,11 +772,11 @@ export default {
       this.tags = newTags;
       this.form.keyword = newTags.join(',');
     },
-    selectChange(checked){
-      if(checked==true){
+    selectChange(checked) {
+      if (checked == true) {
         this.form.validity = '1970-01-01 00:00:00';
-      }else{
-        
+      } else {
+
       }
     }
   },
@@ -836,7 +838,7 @@ export default {
       },
       immediate: true // 立即执行一次
     }
-    
+
   },
   mounted() {
     this.user_type = getUseType();
@@ -927,7 +929,8 @@ export default {
 ::v-deep .el-checkbox {
   margin-left: 20px;
 }
-.imgBox{
+
+.imgBox {
   color: #999;
 }
 

+ 75 - 65
src/views/news/addComplaint.vue → src/views/news/addNcomplaint.vue

@@ -1,52 +1,49 @@
 <template>
+
+
   <div class="mainBox">
     <div class="layerBox">
       <tableTitle :name="tableDivTitle" />
       <el-form :model="form" ref="form" :rules="formRules" label-position="left" label-width="120px">
         <div class="formDiv">
-
-          <el-form-item label="标题:" prop="title" class="custom-align-right">
-            <el-input v-model="form.title" autocomplete="off" placeholder="请输入标题"></el-input>
-          </el-form-item>
-          <el-form-item label="类型:" prop="type" class="custom-align-right">
-            <el-radio-group v-model="form.type">
-              <el-radio :label="1">公告</el-radio>
-              <el-radio :label="2">通知</el-radio>
-            </el-radio-group>
-          </el-form-item>
-          <el-form-item label="级别:" prop="level" class="custom-align-right">
-            <el-radio-group v-model="form.level">
-              <el-radio :label="1">常规</el-radio>
-              <el-radio :label="2">紧急</el-radio>
-              <el-radio :label="3">特急</el-radio>
-            </el-radio-group>
-          </el-form-item>
-          <el-form-item label="内容:" prop="content" class="custom-align-right">
-            <el-input v-model="form.content" maxlength="500" autocomplete="off" placeholder="请输入内容" type="textarea"
-              rows="10"></el-input>
+          <el-form-item label="投诉标题:" prop="title" class="custom-align-right">
+            <el-input v-model="form.title" autocomplete="off" placeholder="请输入投诉标题"></el-input>
           </el-form-item>
+
+
           <el-form-item label="发布范围:" prop="city_arr_id" class="custom-align-right">
             <el-cascader :key="cascaderKey" v-model="form.city_arr_id" placeholder="请选择发布范围" :props="cityData"
               filterable clearable></el-cascader>
           </el-form-item>
-          <el-form-item label="行政职能:"  prop="department_arr_id" class="custom-align-right">
+          <el-form-item label="行政职能:" prop="department_arr_id" class="custom-align-right">
             <el-cascader :key="searchDepartmentKey" v-model="form.department_arr_id" placeholder="请选择行政职能"
               popper-class="my_cascader" :props="searchDepartmentData" filterable clearable></el-cascader>
           </el-form-item>
-          <el-form-item label="发布日期:" prop="timeList" class="custom-align-right">
-            <el-date-picker v-model="form.time" type="daterange" range-separator="至" start-placeholder="开始日期"
-              end-placeholder="结束日期" :picker-options="pickerOptions">
+
+          <el-form-item label="事件描述:" prop="content" class="custom-align-right">
+            <el-input v-model="form.content" maxlength="500" autocomplete="off" placeholder="请输入事件描述:" type="textarea"
+              rows="10"></el-input>
+          </el-form-item>
+
+          <el-form-item label="我的要求:" prop="want" class="custom-align-right">
+            <el-input v-model="form.want" maxlength="500" autocomplete="off" placeholder="请输入我的要求:" type="textarea"
+              rows="10"></el-input>
+          </el-form-item>
+
+
+          <el-form-item label="发生日期:" prop="start" class="custom-align-right">
+            <el-date-picker v-model="form.start" placeholder="请选择发生日期">
             </el-date-picker>
           </el-form-item>
-        
+
           <el-form-item label="附件:" class="custom-align-right" prop="">
             <div class="uploaderBox" @mouseenter="hovering = true" mouseleave="hovering = false">
               <el-upload class="avatar-uploader" action="#" :show-file-list="false" :before-upload="beforeAvatarUpload">
                 <!-- 预览图片 -->
-                <img v-if="file && (fileType == 'jpeg' || fileType =='png' )" :src="file" class="avatar">
-                <div v-if="file && (fileType == 'pdf' || fileType =='word' )" class="chooseImgDiv1">
+                <img v-if="file && (fileType == 'jpeg' || fileType == 'png')" :src="file" class="avatar">
+                <div v-if="file && (fileType == 'pdf' || fileType == 'word')" class="chooseImgDiv1">
                   <div>
-                    <div>{{file}}</div>
+                    <div>{{ file }}</div>
                   </div>
                 </div>
                 <div v-else class="chooseImgDiv">
@@ -63,23 +60,30 @@
               </div>
             </div>
           </el-form-item>
-          <el-form-item label="建立群聊:" prop="is_group" class="custom-align-right">
-              <el-radio-group v-model="form.is_group" :disabled="this.$route.query.id!=undefined"> 
-                <el-radio :label="1">是</el-radio>
-                <el-radio :label="0">否</el-radio>
-              </el-radio-group>
-            </el-form-item>
-
-          <el-form-item label="群聊名称:" prop="group_name" class="custom-align-right" v-if="form.is_group == 1" :disabled="this.$route.query.id!=undefined">
-                <el-input v-model="form.group_name" autocomplete="off" placeholder="请输入群聊名称"></el-input>
+          <el-form-item label="投诉方式" prop="type" class="custom-align-right">
+            <el-radio-group v-model="form.type">
+              <el-radio :label="1">匿名</el-radio>
+              <el-radio :label="2">实名</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <!-- <el-form-item label="建立群聊:" prop="is_group" class="custom-align-right">
+            <el-radio-group v-model="form.is_group" :disabled="this.$route.query.id != undefined">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
           </el-form-item>
+
+          <el-form-item label="群聊名称:" prop="group_name" class="custom-align-right" v-if="form.is_group == 1"
+            :disabled="this.$route.query.id != undefined">
+            <el-input v-model="form.group_name" autocomplete="off" placeholder="请输入群聊名称"></el-input>
+          </el-form-item> -->
         </div>
       </el-form>
     </div>
     <div class="bottomBtnBox">
       <el-button type="info" @click="returnPage">返回</el-button>
       <el-button type="primary" @click="editToServe" v-if="editStatus == true">确定</el-button>
-      <el-button type="primary" @click="addToServe" v-else>发布通知</el-button>
+      <el-button type="primary" @click="addToServe" v-else>发布投诉举报</el-button>
     </div>
   </div>
 </template>
@@ -128,10 +132,11 @@ export default {
       formLabelWidth: '80px',//表单的长度
       //1.表单项 start ------------------------------------------------------------>
       editStatus: false,
-      tableDivTitle: "添加通知",
+      tableDivTitle: "添加投诉举报",
       searchCascaderKey: 0, //列表缓存key
       website_id: 2,
       file: '',
+      userType: 1, //用户类型 1:普通用户,
       pickerOptions: {
         selectableRange: '1900-01-01 to 2100-12-31', // 允许选择的日期范围
         // disabledDate(time) {
@@ -142,8 +147,8 @@ export default {
       //提交表单
       form: {
         //1.1使用了外链
-        title: '',//通知标题
-        type: 1,//类型:1:公告,2:通知
+        title: '',//投诉举报标题
+        type: 1,//类型:1:公告,2:投诉举报
         level: 1,//级别:1:常规,2:紧急,3:特急
         city_arr_id: [],//行政区划
         city_id: '',//城市id
@@ -152,8 +157,9 @@ export default {
         file: "",//文件路径
         department_arr_id: [],//部门id
         department_id: '',//部门id
-        is_group: 0,//是否创建群聊:1:是,0:否
-        group_name: '',//群聊名称
+        want: "",//我的要求
+        type: 1,//发布类型:1:匿名,2:实名
+        start: '',//开始时间
       },
       //1.2 表单验证规则
       formRules: {
@@ -389,24 +395,23 @@ export default {
             this.form.department_id = this.form.department_arr_id.at(-1) || 0;
             this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
           }
-          console.log(typeof this.form.time, '---=-==-=')
-          console.log(this.form.time.length, '---=-==-=')
-          if (typeof this.form.time=='object' && this.form.time.length > 0) {
-            this.form.start = this.formatDate(this.form.time[0]);
-            this.form.end = this.formatDate(this.form.time[1]);
-            delete this.form.time;
-          }
+
           delete this.form.cat_arr_id;
           delete this.form.timelist;
           delete this.form.catid;
           this.form.file = this.file;
           console.log(this.form, 'this.form-----------------')
-          this.$store.dispatch('news/addNotice', this.form).then(res => {
+          if (this.userType == 10000) {
+            this.form.status = 2
+          } else {
+            this.form.status = 1
+          }
+          this.$store.dispatch('news/addComplaint1', this.form).then(res => {
             if (res.code == 200) {
               //汇报结果
               this.$message({
                 type: 'success',
-                message: '已成功添加通知!'
+                message: '已成功添加投诉举报!'
               });
               this.cleatForm();
               //返回列表页
@@ -414,7 +419,7 @@ export default {
             } else {
               this.$message({
                 type: 'error',
-                message: "通知发布失败,请稍后再试!"
+                message: "投诉举报发布失败,请稍后再试!"
               });
             }
           })
@@ -440,7 +445,7 @@ export default {
     //2.跳转操作 start ------------------------------------------------------------>
     returnPage() {
       this.$router.push({
-        path: '/noticeList',
+        path: '/ncomplaintList',
       });
     },
     //跳转操作 end ------------------------------------------------------------>
@@ -451,7 +456,7 @@ export default {
       let data = {
         id: this.$route.query.id
       };
-      this.$store.dispatch('news/getNoticeInfo', data).then(res => {
+      this.$store.dispatch('news/getComplaintInfo', data).then(res => {
         console.log(res);
         this.form.name = res.data.name;
         // 回显导航池
@@ -472,11 +477,11 @@ export default {
         this.form.cat_id = res.data.cat_id;
         this.form.time = [res.data.start, res.data.end];
         this.form.file = res.data.file;
-        this.file = res.data.file; 
+        this.file = res.data.file;
         const filePath = res.data.file;
         const fileExtension = filePath.split('.').pop().toLowerCase();
         this.fileType = fileExtension; // 设置文件类型
-        this.form.is_group = parseInt(res.data.is_group );
+        this.form.is_group = parseInt(res.data.is_group);
         this.form.group_name = res.data.group_name;
       })
     },
@@ -539,7 +544,7 @@ export default {
             this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
           }
           console.log(typeof this.form.time, '---=-==-=')
-          if (typeof this.form.time=='object' && this.form.time.length > 0) {
+          if (typeof this.form.time == 'object' && this.form.time.length > 0) {
             this.form.start = this.formatDate(this.form.time[0]);
             this.form.end = this.formatDate(this.form.time[1]);
             delete this.form.time;
@@ -549,14 +554,21 @@ export default {
           delete this.form.catid;
           this.form.file = this.file;
           console.log(this.form, 'this.form-----------------')
-          this.$store.dispatch('news/updateNotice', this.form).then(res => {
+
+          if (this.userType == 10000) {
+            this.form.status = 2
+          } else {
+            this.form.status = 1
+          }
+
+          this.$store.dispatch('news/updateComplaint', this.form).then(res => {
             if (res.code != 200) {
               this.$message.error("修改失败,请稍后再试!");
             } else {
               //汇报结果
               this.$message({
                 type: 'success',
-                message: '已成功编辑通知!'
+                message: '已成功编辑投诉举报!'
               });
               this.cleatForm();
               //返回列表页
@@ -586,13 +598,13 @@ export default {
     if (this.$route.query.id != undefined) {
       this.editId = this.$route.query.id;
       this.editStatus = true;
-      this.tableDivTitle = "编辑通知";
+      this.tableDivTitle = "编辑投诉举报";
 
-      console.log("编辑通知")
+      console.log("编辑投诉举报")
       this.getMainData();
     } else {
       this.editStatus = false;
-      console.log("添加通知!")
+      console.log("添加投诉举报!")
     }
     this.fetchWebsiteOptions();
     this.getUserInfo();
@@ -602,8 +614,6 @@ export default {
 };
 </script>
 <style scoped lang="less">
-
-
 //执行v-deep穿透scope选择器 start------------------------------------------------------------>*/
 ::v-deep .custom-form-item>.el-form-item__label {
   line-height: 140px !important;

+ 10 - 6
src/views/news/creatNews.vue

@@ -6,7 +6,9 @@
         <div class="formDiv">
           <el-form-item label="资讯题目:" prop="title" class="custom-align-right">
             <el-input v-model="form.title" autocomplete="off" placeholder="请输入资讯标题"></el-input>
-            <el-checkbox v-model="form.islink">是否使用外链</el-checkbox>
+            <!-- <el-checkbox v-model="form.islink">是否使用外链</el-checkbox> -->
+            <el-checkbox v-model="form.islink" v-if="creatNews_user_type == 10000">是否使用外链</el-checkbox> 
+             
           </el-form-item>
           <div v-if="form.islink == true">
             <el-form-item label="站点名称:" prop="web_site_id" class="custom-align-right">
@@ -107,7 +109,7 @@
               <el-form-item label="作者:" prop="author" class="custom-align-right">
                 <el-input v-model="form.author" autocomplete="off" placeholder="请输入作者"></el-input>
               </el-form-item>
-              <el-form-item label="浏览量:" class="custom-align-right">
+              <el-form-item label="浏览量:" v-if="creatNews_user_type == 10000" class="custom-align-right">
                 <el-input v-model="form.hits" autocomplete="off" placeholder="请输入浏览量"></el-input>
               </el-form-item>
               <el-form-item label="是否为原创:" prop="is_original" class="custom-align-right">
@@ -582,7 +584,7 @@ export default {
       }
 
       //先进行验证
-      console.log(this.form);
+      // console.log( "this.form==", this.form);
 
       this.$refs.form.validate(valid => {
         if (valid) {
@@ -601,8 +603,9 @@ export default {
             formData.commend_id = '[]';
           }
 
-          this.$store.dispatch('news/addArticle', formData).then(res => {
+          this.$store.dispatch('news/addArticle', formData).then(res => {//xx
             if (res.code == 200) {
+               console.log("资讯发布成功!200")   
               //汇报结果
               this.$message({
                 type: 'success',
@@ -612,6 +615,7 @@ export default {
               //返回列表页
               this.returnPage()
             } else {
+              console.log("资讯发布失败!?????",res)    
               this.$message({
                 type: 'error',
                 message: "资讯发布失败,请稍后再试!"
@@ -947,7 +951,7 @@ export default {
         });
       })
     },
-    get_creatNews_nav_pool_arr_fun() {//xx
+    get_creatNews_nav_pool_arr_fun() {//
       this.$store.dispatch('pool/get_creatNews_nav_actions', { page: 1, pageSize: 666666 }).then(res => {
         res.data.rows.forEach((per_obj) => {
           let new_per = {
@@ -967,7 +971,7 @@ export default {
       //开启导航池级联选择器
       this.ifwebsitId = true;
       console.log(this.ifwebsitId)
-      //xx  导航池级
+      //  导航池级
       let that = this;
       this.form.web_site_id = this.form.web_site_id[0]
       that.parentKey_2 += 1;

+ 5 - 5
src/views/news/ncomplaintList.vue

@@ -53,9 +53,9 @@
             <el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
             <el-table-column prop="title" label="投诉主题" width="">
             </el-table-column>
-            <el-table-column prop="title" label="投诉类型" width="">
+            <el-table-column prop="department_name" label="投诉类型" width="">
             </el-table-column>
-            <el-table-column prop="type" label="接收人" width="">
+            <el-table-column prop="cityname" label="接收人" width="">
             </el-table-column>
             <el-table-column prop="level" label="处理状态" width="">
               <template slot-scope="scope">
@@ -185,7 +185,7 @@ export default {
         id: id,
         status: status
       }
-      this.$store.dispatch('news/upComplaintStatus', data).then(res => {
+      this.$store.dispatch('news/updateComplaintStatus', data).then(res => {
         if (res.code == 200) {
           this.$message({
             type: 'success',
@@ -225,7 +225,7 @@ export default {
     //跳转到通知发布页面
     goCreat() {
       this.$router.push({
-        path: '/addComplaint',
+        path: '/addNcomplaint',
       });
     },
     goEdit(id) {
@@ -233,7 +233,7 @@ export default {
         id: id
       }
       this.$router.push({
-        path: '/addComplaint',
+        path: '/addNcomplaint',
         query: data
       });
     }