Browse Source

03/20 16:37

111
Xiao_Mo 5 years ago
parent
commit
0407f09094

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-865bdeb2.e13d7e0e.css → dist/static/css/chunk-f8da5086.491d14d5.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.bannerImg[data-v-2ee17bcc],.bannerImg[data-v-6ab4da7b],.bannerImg[data-v-29f2a579],.bannerImg[data-v-35c4d252],.bannerImg[data-v-512b46da],.bannerImg[data-v-10096c94]{height:60px}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.bannerImg[data-v-2ee17bcc],.bannerImg[data-v-5b4f2286],.bannerImg[data-v-29f2a579],.bannerImg[data-v-35c4d252],.bannerImg[data-v-512b46da],.bannerImg[data-v-10096c94]{height:60px}

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.c3919ebe.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-f8da5086.cb10a95e.js


+ 71 - 91
src/views/contentManager/components/training.vue

@@ -1,81 +1,58 @@
 <template>
 <template>
   <div>
   <div>
     <!-- 搜索标题 -->
     <!-- 搜索标题 -->
-    <div @click="openTeaching('create')"
-         class='newBand'>新建</div>
+    <div @click="openTeaching('create')" class="newBand">新建</div>
     <!-- 列表 -->
     <!-- 列表 -->
     <div class="tableWrap">
     <div class="tableWrap">
-      <el-table :data='tableList'
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <el-table-column align='center'
-                         label="轮播图">
+      <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+        <el-table-column align="center" label="轮播图">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <img class="bannerImg"
-                 :src="scope.row.coverImage"
-                 alt="">
+            <img class="bannerImg" :src="scope.row.coverImage" alt />
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column align='center'
-                         prop="title"
-                         label="标题">
+        <el-table-column align="center" prop="title" label="标题"></el-table-column>
+        <el-table-column align="center" label="跳转连接">
+          <template slot-scope="scope">{{ scope.row.linkUrl + '/' + scope.row.id }}</template>
         </el-table-column>
         </el-table-column>
-        <el-table-column align='center'
-                         label="跳转连接">
-          <template slot-scope="scope">
-            {{ scope.row.linkUrl + '/' + scope.row.id }}
-          </template>
+        <el-table-column align="center" prop="remark" label="是否使用">
+          <template slot-scope="scope">{{ scope.row.status == 1 ? '是' : '否' }}</template>
         </el-table-column>
         </el-table-column>
-        <el-table-column align='center'
-                         prop="remark"
-                         label="是否使用">
-          <template slot-scope="scope">
-            {{ scope.row.status == 1 ? '是' : '否' }}
-          </template>
-        </el-table-column>
-        <el-table-column align='center'
-                         prop="order"
-                         label="排序">
-        </el-table-column>
-             <el-table-column align="center" prop="remark" label="适用范围">
+        <el-table-column align="center" prop="order" label="排序"></el-table-column>
+        <el-table-column align="center" prop="remark" label="适用范围">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <p v-if=" scope.row.tenantId == 1">对内</p>
             <p v-if=" scope.row.tenantId == 1">对内</p>
             <p v-if=" scope.row.tenantId == 2">对外</p>
             <p v-if=" scope.row.tenantId == 2">对外</p>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column align='center'
-                         label="操作">
+        <el-table-column align="center" label="操作">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button @click="openTeaching('update', scope.row)"
-                       type="text">修改</el-button>
-            <el-button v-if="scope.row.status == 1"
-                       @click="onStop(scope.row, 0)"
-                       type="text">停用</el-button>
-            <el-button v-else
-                       @click="onStop(scope.row, 1)"
-                       type="text">启用</el-button>
-            <el-button @click="onDel(scope.row)"
-                       type="text">删除</el-button>
+            <el-button @click="openTeaching('update', scope.row)" type="text">修改</el-button>
+            <el-button v-if="scope.row.status == 1" @click="onStop(scope.row, 0)" type="text">停用</el-button>
+            <el-button v-else @click="onStop(scope.row, 1)" type="text">启用</el-button>
+            <el-button @click="onDel(scope.row)" type="text">删除</el-button>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
-      <pagination :total="pageInfo.total"
-                  :page.sync="pageInfo.page"
-                  :limit.sync="pageInfo.limit"
-                  :page-sizes="pageInfo.page_size"
-                  @pagination="getList" />
+      <pagination
+        :total="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { newsList, newsUpdate, newsDel } from '@/api/contentManager'
-import pagination from '@/components/Pagination/index'
-import store from '@/store'
+import { newsList, newsUpdate, newsDel } from "@/api/contentManager";
+import pagination from "@/components/Pagination/index";
+import store from "@/store";
 export default {
 export default {
-  name: 'training',
+  name: "training",
   components: {
   components: {
     pagination
     pagination
   },
   },
-  data () {
+  data() {
     return {
     return {
       tableList: [],
       tableList: [],
       organId: null,
       organId: null,
@@ -87,74 +64,77 @@ export default {
         total: 1, // 总条数
         total: 1, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
       }
       }
-    }
+    };
   },
   },
-  activated () {
-    this.getList()
+  activated() {
+    this.getList();
   },
   },
-  mounted () {
-    this.getList()
+  mounted() {
+    this.getList();
   },
   },
   methods: {
   methods: {
-    getList () {
+    getList() {
       let params = {
       let params = {
         rows: this.pageInfo.limit,
         rows: this.pageInfo.limit,
         page: this.pageInfo.page,
         page: this.pageInfo.page,
         type: 4
         type: 4
-      }
+      };
       newsList(params).then(res => {
       newsList(params).then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
-          this.tableList = res.data.rows
-          this.pageInfo.total = res.data.total
+          this.tableList = res.data.rows;
+          this.pageInfo.total = res.data.total;
         }
         }
-      })
+      });
     },
     },
-    openTeaching (type, rows) {
-      let params = {}
-      if (type == 'update') {
-        params.id = rows.id
+    openTeaching(type, rows) {
+      let params = {};
+      if (type == "update") {
+        params.id = rows.id;
       }
       }
-      params.type = 4
-      params.pageType = type
+      params.type = 4;
+      params.pageType = type;
       this.$router.push({
       this.$router.push({
-        path: '/contentManager/contentOperation',
+        path: "/contentManager/contentOperation",
         query: params
         query: params
-      })
+      });
     },
     },
-    onDel (row) { // 删除
-      this.$confirm('确定是否删除?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        newsDel({ id: row.id }).then(res => {
-          if (res.code == 200) {
-            this.$message.success('删除成功')
-            this.getList()
-          } else {
-            this.$message.error(res.msg)
-          }
+    onDel(row) {
+      // 删除
+      this.$confirm("确定是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          newsDel({ id: row.id }).then(res => {
+            if (res.code == 200) {
+              this.$message.success("删除成功");
+              this.getList();
+            } else {
+              this.$message.error(res.msg);
+            }
+          });
         })
         })
-      }).catch(() => { })
-
+        .catch(() => {});
     },
     },
-    onStop (row, status) { // 停止
+    onStop(row, status) {
+      // 停止
       // newsUpdate
       // newsUpdate
-      let tempStr = ['停用', '启用']
+      let tempStr = ["停用", "启用"];
       newsUpdate({
       newsUpdate({
         id: row.id,
         id: row.id,
         status: status
         status: status
       }).then(res => {
       }).then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
-          this.$message.success(tempStr[status] + '成功')
-          this.getList()
+          this.$message.success(tempStr[status] + "成功");
+          this.getList();
         } else {
         } else {
-          this.$message.error(res.msg)
+          this.$message.error(res.msg);
         }
         }
-      })
+      });
     }
     }
   }
   }
-}
+};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .bannerImg {
 .bannerImg {

Some files were not shown because too many files changed in this diff