Browse Source

新闻模块更新完成

guhongwei 5 years ago
parent
commit
f2cca8f523

+ 166 - 0
src/layout/news/examineData.vue

@@ -0,0 +1,166 @@
+<template>
+  <div id="examineData">
+    <el-row>
+      <el-col :span="24" class="examineData">
+        <el-table :data="examineData" style="width: 100%" border>
+          <el-table-column label="序号" type="index" width="50" align="left"> </el-table-column>
+          <el-table-column prop="name" label="创建用户名称" width="110" align="left"> </el-table-column>
+          <el-table-column prop="title" label="新闻名称" width="484" align="left"> </el-table-column>
+          <el-table-column prop="date" label="创建时间" width="100" align="left"> </el-table-column>
+          <el-table-column prop="state" label="状态" width="120" align="left"> </el-table-column>
+          <el-table-column label="操作" width="180" align="left">
+            <template slot-scope="scoped">
+              <el-button size="mini" type="primary" icon="el-icon-view" title="查看详情" @click="openDialog(scoped.$index)"></el-button>
+              <el-button size="mini" type="primary" icon="el-icon-edit" title="通过" @click="adopt"></el-button>
+              <el-button size="mini" type="danger" icon="el-icon-delete" title="拒绝" @click="refuse"></el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-col :span="24" class="page">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            layout="total, prev, pager, next, jumper"
+            :total="1"
+          >
+          </el-pagination>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog title="新闻资讯审核" :visible.sync="dialog">
+      <el-form :model="info">
+        <el-form-item label="新闻名称:" :label-width="formLabelWidth">
+          <span>{{ info.name }}</span>
+        </el-form-item>
+        <el-form-item label="创建时间:" :label-width="formLabelWidth">
+          <span>{{ info.date }}</span>
+        </el-form-item>
+        <el-form-item label="内容:" :label-width="formLabelWidth">
+          <span>{{ info.content }}</span>
+        </el-form-item>
+        <el-form-item label="审核结果描述:" :label-width="formLabelWidth">
+          <el-input type="textarea" v-model="info.miaoshu" placeholder="请输入审核结果描述"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="dialog = false">通 过</el-button>
+        <el-button type="danger" @click="dialog = false">拒 绝</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'examineData',
+  props: {
+    examineData: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 1,
+    dialog: false,
+    info: {},
+    formLabelWidth: '120px',
+    pic: require('@/assets/logo.png'),
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+    openDialog(index) {
+      if (index !== undefined) {
+        let data = JSON.parse(JSON.stringify(this.examineData[index]));
+        data[`index`] = index;
+        this.$set(this, `info`, data);
+      }
+      this.dialog = true;
+    },
+    refuse() {
+      this.$confirm('审核拒绝,您确定吗?', '系统提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$message({
+            type: 'success',
+            message: '操作成功!',
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消操作',
+          });
+        });
+    },
+    adopt() {
+      this.$confirm('审核通过,您确定吗?', '系统提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$message({
+            type: 'success',
+            message: '操作成功!',
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消操作',
+          });
+        });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.examineData {
+  padding: 20px 0 0 0;
+}
+/deep/.el-table th {
+  padding: 5px 0;
+  background: #f2f2f2;
+}
+/deep/.el-table td {
+  padding: 5px 0;
+}
+/deep/.el-table tr {
+  background: #f9f9f9;
+}
+/deep/.el-table tr:nth-child(2n) {
+  background: #fff;
+}
+.page {
+  text-align: center;
+  padding: 30px 0;
+}
+.text {
+  font-size: 16px;
+  padding: 0 0 10px 0;
+}
+.text span {
+  display: inherit;
+  text-indent: 1rem;
+}
+/deep/.el-form-item {
+  margin-bottom: 0;
+}
+/deep/.el-dialog__footer {
+  text-align: center;
+}
+</style>

+ 8 - 2
src/layout/news/mainData.vue

@@ -29,10 +29,11 @@
       </el-col>
     </el-row>
     <el-dialog title="详细信息" :visible.sync="dialog">
+      <p class="text">创建用户名称:{{ info.name }}</p>
       <p class="text">新闻名称:{{ info.title }}</p>
       <p class="text">
-        封面图片:
-        <el-image :src="info.pic"></el-image>
+        <span>封面图片:</span>
+        <el-image style="width:100%;height:400px;" :src="pic"></el-image>
       </p>
       <p class="text">
         新闻内容:<span>{{ info.content }}</span>
@@ -52,6 +53,7 @@ export default {
     currentPage: 1,
     dialog: false,
     info: {},
+    pic: require('@/assets/logo.png'),
   }),
   created() {},
   computed: {},
@@ -86,6 +88,10 @@ export default {
 </script>
 
 <style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
 /deep/.el-table th {
   padding: 5px 0;
   background: #f2f2f2;

+ 16 - 0
src/router/index.js

@@ -62,21 +62,37 @@ export default new Router({
       path: '/news/innovate/index',
       component: () => import('../views//news/innovate/index.vue'),
     },
+    {
+      path: '/news/innovate/detail',
+      component: () => import('../views//news/innovate/detail.vue'),
+    },
     // 新闻管理-国内动态
     {
       path: '/news/domestic/index',
       component: () => import('../views//news/domestic/index.vue'),
     },
+    {
+      path: '/news/domestic/detail',
+      component: () => import('../views//news/domestic/detail.vue'),
+    },
     // 新闻管理-政务活动
     {
       path: '/news/govern/index',
       component: () => import('../views//news/govern/index.vue'),
     },
+    {
+      path: '/news/govern/detail',
+      component: () => import('../views//news/govern/detail.vue'),
+    },
     // 新闻管理-媒体聚焦
     {
       path: '/news/media/index',
       component: () => import('../views//news/media/index.vue'),
     },
+    {
+      path: '/news/media/detail',
+      component: () => import('../views//news/media/detail.vue'),
+    },
     // 新闻管理-信息审核
     {
       path: '/news/examine/index',

+ 45 - 0
src/views/news/domestic/detail.vue

@@ -0,0 +1,45 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainForm :form="form"></mainForm>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import mainForm from '@/layout/news/mainForm.vue';
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    topInfo, //头部标题
+    mainForm, //新闻信息form
+  },
+  data: () => ({
+    topTitle: '国内动态信息编辑',
+    form: {},
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 53 - 4
src/views/news/domestic/index.vue

@@ -1,19 +1,68 @@
 <template>
   <div id="index">
-    <p>国内动态</p>
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="search">
+          <searchInfo></searchInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainData :tableData="tableData"></mainData>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import topInfo from '@/layout/public/top.vue';
+import searchInfo from '@/layout/news/searchInfo.vue';
+import mainData from '@/layout/news/mainData.vue';
 export default {
   name: 'index',
   props: {},
-  components: {},
-  data: () => ({}),
+  components: {
+    topInfo, //头部标题
+    searchInfo, //搜索
+    mainData, //新闻信息列表
+  },
+  data: () => ({
+    topTitle: '国内动态',
+    tableData: [
+      {
+        name: '测试人员',
+        title: '国内外参展商和广大客户的广泛好评。尤其是参展的“太阳能无线充电移动电源”、“超声波智能水槽',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+      {
+        name: '测试人员',
+        title: '十条数据',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+    ],
+  }),
   created() {},
   computed: {},
   methods: {},
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.search {
+  height: 40px;
+  line-height: 40px;
+  padding: 0 15px;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 38 - 4
src/views/news/examine/index.vue

@@ -1,19 +1,53 @@
 <template>
   <div id="index">
-    <p>新闻信息审核</p>
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <examineData :examineData="examineData"></examineData>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import topInfo from '@/layout/public/top.vue';
+import examineData from '@/layout/news/examineData.vue';
+
 export default {
   name: 'index',
   props: {},
-  components: {},
-  data: () => ({}),
+  components: {
+    topInfo, //头部标题
+    examineData, //新闻资讯审核
+  },
+  data: () => ({
+    topTitle: '新闻资讯审核',
+    examineData: [
+      {
+        name: '测试人员',
+        title: '测试标题',
+        date: '2019-01-13',
+        state: '待管理员审核',
+      },
+    ],
+  }),
   created() {},
   computed: {},
   methods: {},
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 45 - 0
src/views/news/govern/detail.vue

@@ -0,0 +1,45 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainForm :form="form"></mainForm>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import mainForm from '@/layout/news/mainForm.vue';
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    topInfo, //头部标题
+    mainForm, //新闻信息form
+  },
+  data: () => ({
+    topTitle: '政务活动信息编辑',
+    form: {},
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 53 - 4
src/views/news/govern/index.vue

@@ -1,19 +1,68 @@
 <template>
   <div id="index">
-    <p>政务活动</p>
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="search">
+          <searchInfo></searchInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainData :tableData="tableData"></mainData>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import topInfo from '@/layout/public/top.vue';
+import searchInfo from '@/layout/news/searchInfo.vue';
+import mainData from '@/layout/news/mainData.vue';
 export default {
   name: 'index',
   props: {},
-  components: {},
-  data: () => ({}),
+  components: {
+    topInfo, //头部标题
+    searchInfo, //搜索
+    mainData, //新闻信息列表
+  },
+  data: () => ({
+    topTitle: '政务活动',
+    tableData: [
+      {
+        name: '测试人员',
+        title: '国内外参展商和广大客户的广泛好评。尤其是参展的“太阳能无线充电移动电源”、“超声波智能水槽',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+      {
+        name: '测试人员',
+        title: '十条数据',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+    ],
+  }),
   created() {},
   computed: {},
   methods: {},
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.search {
+  height: 40px;
+  line-height: 40px;
+  padding: 0 15px;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 45 - 0
src/views/news/innovate/detail.vue

@@ -0,0 +1,45 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainForm :form="form"></mainForm>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import mainForm from '@/layout/news/mainForm.vue';
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    topInfo, //头部标题
+    mainForm, //新闻信息form
+  },
+  data: () => ({
+    topTitle: '政务活动信息编辑',
+    form: {},
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 53 - 4
src/views/news/innovate/index.vue

@@ -1,19 +1,68 @@
 <template>
   <div id="index">
-    <p>创新吉林</p>
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="search">
+          <searchInfo></searchInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainData :tableData="tableData"></mainData>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import topInfo from '@/layout/public/top.vue';
+import searchInfo from '@/layout/news/searchInfo.vue';
+import mainData from '@/layout/news/mainData.vue';
 export default {
   name: 'index',
   props: {},
-  components: {},
-  data: () => ({}),
+  components: {
+    topInfo, //头部标题
+    searchInfo, //搜索
+    mainData, //新闻信息列表
+  },
+  data: () => ({
+    topTitle: '政务活动',
+    tableData: [
+      {
+        name: '测试人员',
+        title: '传达学习习近平总书记在中央政治局常委会议上关于上半年经济形势的重要讲话精神',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+      {
+        name: '测试人员',
+        title: '十条数据',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+    ],
+  }),
   created() {},
   computed: {},
   methods: {},
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.search {
+  height: 40px;
+  line-height: 40px;
+  padding: 0 15px;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 45 - 0
src/views/news/media/detail.vue

@@ -0,0 +1,45 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainForm :form="form"></mainForm>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import mainForm from '@/layout/news/mainForm.vue';
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    topInfo, //头部标题
+    mainForm, //新闻信息form
+  },
+  data: () => ({
+    topTitle: '媒体聚焦信息编辑',
+    form: {},
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>

+ 53 - 4
src/views/news/media/index.vue

@@ -1,19 +1,68 @@
 <template>
   <div id="index">
-    <p>媒体聚焦</p>
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="search">
+          <searchInfo></searchInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <mainData :tableData="tableData"></mainData>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import topInfo from '@/layout/public/top.vue';
+import searchInfo from '@/layout/news/searchInfo.vue';
+import mainData from '@/layout/news/mainData.vue';
 export default {
   name: 'index',
   props: {},
-  components: {},
-  data: () => ({}),
+  components: {
+    topInfo, //头部标题
+    searchInfo, //搜索
+    mainData, //新闻信息列表
+  },
+  data: () => ({
+    topTitle: '媒体聚焦',
+    tableData: [
+      {
+        name: '测试人员',
+        title: '国内外参展商和广大客户的广泛好评。尤其是参展的“太阳能无线充电移动电源”、“超声波智能水槽',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+      {
+        name: '测试人员',
+        title: '十条数据',
+        date: '2019-01-13',
+        state: '通过审核',
+      },
+    ],
+  }),
   created() {},
   computed: {},
   methods: {},
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.top {
+  height: 40px;
+  background-color: #f5f5f5;
+}
+.search {
+  height: 40px;
+  line-height: 40px;
+  padding: 0 15px;
+}
+.main {
+  width: 97%;
+  margin: 0 15px;
+}
+</style>