|
|
@@ -1,63 +1,66 @@
|
|
|
<template>
|
|
|
<div class="notice_changShang">
|
|
|
- <div style="color: #80808059;border: 1px solid;"></div>
|
|
|
- <button @click="announce()">发布公告</button>
|
|
|
- <div class="tableD">
|
|
|
- <div class="table_template">
|
|
|
- <table class="table">
|
|
|
- <thead>
|
|
|
- <tr :style="tableHeadStyle">
|
|
|
- <td
|
|
|
- v-for="(item, index) in tableHeaderD"
|
|
|
+ <div v-if="isFather()">
|
|
|
+ <div style="color: #80808059; border: 1px solid"></div>
|
|
|
+ <button @click="announce()">发布公告</button>
|
|
|
+ <div class="tableD">
|
|
|
+ <div class="table_template">
|
|
|
+ <table class="table">
|
|
|
+ <thead>
|
|
|
+ <tr :style="tableHeadStyle">
|
|
|
+ <td
|
|
|
+ v-for="(item, index) in tableHeaderD"
|
|
|
+ :key="index"
|
|
|
+ :style="tableHeadStyle"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr
|
|
|
+ v-for="(obj, index) in tableData"
|
|
|
:key="index"
|
|
|
- :style="tableHeadStyle"
|
|
|
+ :class="{ table_gray: !discolor && index % 2 === 0 }"
|
|
|
>
|
|
|
- {{ item }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <tr
|
|
|
- v-for="(obj, index) in tableData"
|
|
|
- :key="index"
|
|
|
- :class="{ table_gray: !discolor && index % 2 === 0 }"
|
|
|
- >
|
|
|
- <td>{{ obj.informationName || "标题" }}</td>
|
|
|
- <td>{{ obj.accountScope || "重要通知" }}</td>
|
|
|
- <td>
|
|
|
- {{
|
|
|
- (obj.fileUploadDate || "")
|
|
|
- .replace("T", " ")
|
|
|
- .slice(0, -4)
|
|
|
- .replace(RegExp("-", "g"), "/")
|
|
|
- }}
|
|
|
- </td>
|
|
|
+ <td class="titleStyle">{{ obj.informationName || "标题" }}</td>
|
|
|
+ <td>{{ obj.accountScope || "重要通知" }}</td>
|
|
|
+ <td>
|
|
|
+ {{
|
|
|
+ (obj.fileUploadDate || "")
|
|
|
+ .replace("T", " ")
|
|
|
+ .slice(0, -4)
|
|
|
+ .replace(RegExp("-", "g"), "/")
|
|
|
+ }}
|
|
|
+ </td>
|
|
|
|
|
|
- <td v-if="operation" :style="trStyle" class="operationStyle">
|
|
|
- <div class="operationBox">
|
|
|
- <span
|
|
|
- style="cursor: pointer"
|
|
|
- v-for="(operationObj, i) in operation"
|
|
|
- :key="i"
|
|
|
- @click="operationObj.function(obj, index)"
|
|
|
- >{{ operationObj.name }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <td v-if="operation" :style="trStyle" class="operationStyle">
|
|
|
+ <div class="operationBox">
|
|
|
+ <span
|
|
|
+ style="cursor: pointer"
|
|
|
+ v-for="(operationObj, i) in operation"
|
|
|
+ :key="i"
|
|
|
+ @click="operationObj.function(obj, index)"
|
|
|
+ >{{ operationObj.name }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="pageD">
|
|
|
+ <TablePage
|
|
|
+ :totalPage="totalPage"
|
|
|
+ :currentPage="currentPage"
|
|
|
+ @change_page="changePage"
|
|
|
+ @jump_page="jumpPage"
|
|
|
+ />
|
|
|
+ <p>共{{ totalPage }}页,共{{ sum }}条数据</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="pageD">
|
|
|
- <TablePage
|
|
|
- :totalPage="totalPage"
|
|
|
- :currentPage="currentPage"
|
|
|
- @change_page="changePage"
|
|
|
- @jump_page="jumpPage"
|
|
|
- />
|
|
|
- <p>共{{ totalPage }}页,共{{ sum }}条数据</p>
|
|
|
- </div>
|
|
|
+ <router-view></router-view>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -110,7 +113,6 @@ export default {
|
|
|
},
|
|
|
onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试
|
|
|
userId: localStorage.getItem("userId") || "",
|
|
|
-
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -143,7 +145,22 @@ export default {
|
|
|
},
|
|
|
//编辑
|
|
|
edit: function (config) {
|
|
|
- console.log(config)
|
|
|
+ console.log(config);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/changShang/editPage",
|
|
|
+ query: {},
|
|
|
+ });
|
|
|
+ },
|
|
|
+ isFather: function () {
|
|
|
+ return this.$route.path == '/changShang' ? true : false;
|
|
|
+ },
|
|
|
+ /* 发布公告 */
|
|
|
+ announce: function () {
|
|
|
+ console.log(' 发布公告')
|
|
|
+ this.$router.push({
|
|
|
+ path: "/changShang/editPage",
|
|
|
+ query: {},
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
created() {},
|
|
|
@@ -151,6 +168,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
+.titleStyle {
|
|
|
+ color: #0000ff;
|
|
|
+}
|
|
|
/* 查看详情样式 */
|
|
|
.table_template {
|
|
|
text-align: center;
|