Browse Source

修改样式和增加逻辑删除判断

wrh 2 years ago
parent
commit
1a38e6a94b

+ 1 - 0
nngkxxdp/src/main/resources/mapper/SmsMessageDao.xml

@@ -178,6 +178,7 @@
         FROM (
                  SELECT *
                  FROM sort_article_headlines
+                 WHERE is_deleted = 0
                  ORDER BY create_time DESC LIMIT 9999999
              ) a
         GROUP BY a.official_account

+ 17 - 16
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/router/index.js

@@ -157,22 +157,23 @@ export const constantRoutes = [{
       title: '机构管理',
       icon: 'dashboard'
     },
-    children: [{
-        path: 'department',
-        component: Department,
-        name: 'Department',
-        meta: {
-          title: '部门管理'
-        }
-      },
-      {
-        path: 'column',
-        component: Column,
-        name: 'Column',
-        meta: {
-          title: '栏目管理'
-        }
-      },
+    children: [
+      // {
+      //   path: 'department',
+      //   component: Department,
+      //   name: 'Department',
+      //   meta: {
+      //     title: '部门管理'
+      //   }
+      // },
+      // {
+      //   path: 'column',
+      //   component: Column,
+      //   name: 'Column',
+      //   meta: {
+      //     title: '栏目管理'
+      //   }
+      // },
       {
         path: 'huaLongData',
         component: HuaLongData,

+ 2 - 6
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/views/decisionMatters/DecisionMatters.vue

@@ -25,7 +25,8 @@
             <el-table-column label="操作" width="220">
                 <template slot-scope="scope">
                     <el-button class="but" type="primary" @click="openDialog(scope.row.id)">查看</el-button>
-                    <el-button class="but" type="primary" @click="releaseDecision(scope.row.id)">发布</el-button>
+                    <el-button class="but" :type="scope.row.state == 1 ?'' : 'primary'" :disabled="scope.row.state == 1"
+                        @click="releaseDecision(scope.row.id)">发布</el-button>
                     <el-button class="but" type="primary" @click="openModifyWorkDialog(scope.row.id)">修改</el-button>
                     <el-button class="but" type="danger" @click="handleDelete(scope.row.id, scope.$index)">删除
                     </el-button>
@@ -592,11 +593,6 @@
         margin-bottom: 10px;
     }
 
-    /deep/ .btn-custom-cancel {
-        float: right !important;
-        margin-left: 10px !important;
-    }
-
     .add {
         width: 66px;
         height: 38px;

+ 10 - 11
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/views/mechanism/Column.vue

@@ -47,7 +47,7 @@
             <div slot="title">
                 <div class="addTitle">{{workTitle}}</div>
             </div>
-            <div style="height:65vh;overflow: auto;padding-right: 20px">
+            <div style="height:475px;overflow: auto;padding-right: 20px">
                 <el-form :model="postManagement" label-width="140px">
                     <el-row>
                         <el-col :span="12">
@@ -87,22 +87,21 @@
             </div>
         </el-dialog>
         <!--栏目信息-->
-        <el-dialog :visible.sync="columnVisible" :append-to-body="true" style="margin: 10px auto!important" width="80%"
-            top="10px">
+        <el-dialog :visible.sync="columnVisible" :show-close="false" :append-to-body="true"
+            style="margin: 10px auto!important" width="80%" top="10px">
             <div slot="title">
                 <div class="addTitle">栏目信息</div>
             </div>
+            <el-button style="float: left" type="primary" @click="columnVisible = false">返回</el-button>
             <div style="float: right;margin-bottom: 10px;margin-right: 10px">
-                <label>栏目ID</label>
                 <el-input v-model.trim="columnSorts.chnlid" clearable placeholder="请输入栏目ID"
                     style="margin: 0 10px;width: 200px" />
-                <label>栏目名称</label>
                 <el-input v-model.trim="columnSorts.chnlidName" clearable placeholder="请输入栏目名称"
                     style="margin: 0 10px;width: 200px" />
                 <el-button type="primary" class="search" @click="searchColumn">搜索</el-button>
                 <el-button type="primary" class="search" @click="resetColumn" style="margin-left: 5px">重置</el-button>
             </div>
-            <el-table :data="columnData" border ref='columnTable' stripe :height="tableH"
+            <el-table :data="columnData" border ref='columnTable' stripe height="475px"
                 :header-cell-style="{ background: '#e5e8ed', color: '#666', textAlign: 'center' }"
                 :cell-style="tableStyle" style="cursor: default">
                 <el-table-column width="50" label="序号">
@@ -126,19 +125,19 @@
             </div>
         </el-dialog>
         <!--部门信息-->
-        <el-dialog :visible.sync="deptVisible" :append-to-body="true" style="margin: 10px auto!important" width="80%"
-            top="10px">
+        <el-dialog :visible.sync="deptVisible" :show-close="false" :append-to-body="true"
+            style="margin: 10px auto!important" width="80%" top="10px">
             <div slot="title">
                 <div class="addTitle">部门信息</div>
             </div>
+            <el-button style="float: left" type="primary" @click="deptVisible = false">返回</el-button>
             <div style="float: right;margin-bottom: 10px;margin-right: 10px">
-                <label>部门名称</label>
                 <el-input v-model.trim="deptSorts.deptName" clearable placeholder="请输入部门名称"
                     style="margin: 0 10px;width: 200px" />
                 <el-button type="primary" class="search" @click="searchDept">搜索</el-button>
                 <el-button type="primary" class="search" @click="resetDept" style="margin-left: 5px">重置</el-button>
             </div>
-            <el-table :data="deptData" border ref='deptTable' stripe :height="tableH"
+            <el-table :data="deptData" border ref='deptTable' stripe height="475px"
                 :header-cell-style="{ background: '#e5e8ed', color: '#666', textAlign: 'center' }"
                 :cell-style="tableStyle" style="cursor: default">
                 <el-table-column width="50" label="序号">
@@ -159,7 +158,7 @@
                     </template>
                 </el-table-column>
             </el-table>
-            <div class="block">
+            <div>
                 <el-pagination @size-change="deptSizeChange" @current-change="deptCurrentChange"
                     :current-page="deptSorts.page" :page-sizes="[10, 20, 30, 40, 50]" :page-size="deptSorts.limit"
                     layout="prev, pager,next,jumper,total,sizes" :total="deptTotal">

+ 5 - 5
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/views/mechanism/Department.vue

@@ -245,7 +245,7 @@
             <div slot="title">
                 <div class="addTitle">栏目信息</div>
             </div>
-            <el-table :data="columnData" border ref='columnTable' stripe :height="tableH"
+            <el-table :data="columnData" border ref='columnTable' stripe height="525px"
                 :header-cell-style="{ background: '#e5e8ed', color: '#666', textAlign: 'center' }"
                 :cell-style="tableStyle" style="cursor: default">
                 <el-table-column width="50" label="序号">
@@ -277,7 +277,7 @@
             <div slot="title">
                 <div class="addTitle">栏目迁移</div>
             </div>
-            <div style="height:65vh;overflow: auto;padding-right: 20px">
+            <div style="height:487px;overflow: auto;padding-right: 20px">
                 <el-form :model="migration" label-width="140px">
                     <el-row>
                         <el-col :span="12">
@@ -314,19 +314,19 @@
             </div>
         </el-dialog>
         <!--部门信息-->
-        <el-dialog :visible.sync="deptVisible" :append-to-body="true" style="margin: 10px auto!important" width="80%"
+        <el-dialog :visible.sync="deptVisible" :show-close="false" :append-to-body="true" style="margin: 10px auto!important" width="80%"
             top="10px">
             <div slot="title">
                 <div class="addTitle">部门信息</div>
             </div>
+            <el-button style="float: left" type="primary" @click="deptVisible = false">返回</el-button>
             <div style="float: right;margin-bottom: 10px;margin-right: 10px">
-                <label>部门名称</label>
                 <el-input v-model.trim="deptSorts.deptName" clearable placeholder="请输入部门名称"
                     style="margin: 0 10px;width: 200px" />
                 <el-button type="primary" class="search" @click="searchDept">搜索</el-button>
                 <el-button type="primary" class="search" @click="resetDept" style="margin-left: 5px">重置</el-button>
             </div>
-            <el-table :data="deptData" border ref='deptTable' stripe :height="tableH"
+            <el-table :data="deptData" border ref='deptTable' stripe height="475px"
                 :header-cell-style="{ background: '#e5e8ed', color: '#666', textAlign: 'center' }"
                 :cell-style="tableStyle" style="cursor: default">
                 <el-table-column width="50" label="序号">

+ 17 - 40
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/views/newMediaMatrix/Article.vue

@@ -89,7 +89,8 @@
                         <el-col :span="12">
                             <el-form-item label="发布时间" prop="createTime">
                                 <el-date-picker v-model="postManagement.createTime" type="datetime"
-                                    placeholder="请选择发布时间" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
+                                    placeholder="请选择发布时间" :picker-options="pickerOptions"
+                                    value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
                                 </el-date-picker>
                             </el-form-item>
                         </el-col>
@@ -149,6 +150,11 @@
                     file: null,
                     fileList: []
                 },
+                pickerOptions: {
+                    disabledDate(time) {
+                        return time.getTime() > Date.now() - 8.64e6; //只能选择今天及今天之前的日期
+                    }
+                },
                 // 上传文件界面
                 dialogVisible: false,
                 //新增/编辑媒体界面
@@ -345,10 +351,10 @@
                         this.upload.isUploading = false;
                         this.$message.error("上传失败,有" + r.data.msg + "条数据错误");
                     }
-                }).catch(() => {
+                }).catch(res => {
                     this.upload.open = false;
                     this.upload.isUploading = false;
-                    this.$message.error("上传失败");
+                    this.$message.error(res.response.data.message);
                 })
             },
             exportExcel(name, titleArr, sheetName) {
@@ -369,6 +375,14 @@
     }
 </script>
 
+<style>
+    /* 全局取消按钮 */
+    .btn-custom-cancel {
+        margin-left: 10px !important;
+        float: right;
+    }
+</style>
+
 <style scoped lang="less">
     /* 禁用后的勾选*/
     /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
@@ -380,33 +394,6 @@
         border-color: #DCDFE6;
     }
 
-    /deep/ [data-v-2cde7735] .el-upload-list--picture .el-upload-list__item-name {
-        display: block;
-        margin-top: 0px;
-        margin-left: -78px;
-    }
-
-    /deep/ .el-upload-list--picture .el-upload-list__item {
-        display: flex;
-        flex-direction: column-reverse;
-        width: 100%;
-        height: 100%;
-    }
-
-    /deep/ .el-upload-list--picture .el-upload-list__item-name i {
-        display: none;
-    }
-
-    /deep/ .el-upload-list--picture .el-upload-list__item-name {
-        display: block;
-        margin-top: 0px;
-    }
-
-    /deep/ .el-upload-list--picture .el-upload-list__item-thumbnail {
-        width: 100%;
-        height: 100%;
-    }
-
     /deep/ .el-dialog__body {
         padding: 0 0 30px 20px;
         color: #606266;
@@ -432,22 +419,12 @@
         margin-bottom: 10px;
     }
 
-    /deep/ .btn-custom-cancel {
-        float: right !important;
-        margin-left: 10px !important;
-    }
-
     .add {
         width: 66px;
         height: 38px;
         margin-left: 0;
     }
 
-    /deep/ .el-message-box__btns .el-button:nth-child(2) {
-        margin-right: 10px;
-        float: right;
-    }
-
     /deep/ .el-col-12 {
         width: 50%;
         text-align: left;

+ 8 - 2
nngkxxdp/src/main/resources/static/naqwzsjtj/naqwzsjtj/src/views/newMediaMatrix/WOfa.vue

@@ -64,7 +64,8 @@
                     <el-row>
                         <el-col :span="12">
                             <el-form-item label="更新时间" prop="updateTime">
-                                <el-date-picker v-model="postManagement.updateTime" value-format="yyyy-MM-dd" type="date" placeholder="请选择更新时间" style="width: 100%">
+                                <el-date-picker v-model="postManagement.updateTime" :picker-options="pickerOptions"
+                                    value-format="yyyy-MM-dd" type="date" placeholder="请选择更新时间" style="width: 100%">
                                 </el-date-picker>
                             </el-form-item>
                         </el-col>
@@ -123,6 +124,11 @@
                     file: null,
                     fileList: []
                 },
+                pickerOptions: {
+                    disabledDate(time) {
+                        return time.getTime() > Date.now() - 8.64e6; //只能选择今天及今天之前的日期
+                    }
+                },
                 // 上传文件界面
                 dialogVisible: false,
                 //编辑界面
@@ -236,7 +242,7 @@
                         this.sorts.page = 1;
                         this.getData();
                         console.log(r);
-                        this.$message.success("上传成功,已更新" +  r.data.msg + "条记录");
+                        this.$message.success("上传成功,已更新" + r.data.msg + "条记录");
                         this.upload.open = false;
                         this.upload.isUploading = false;
                     } else {