1
lzhe
2024-10-10 d1b6cd8e5270b15546c94587fe2648453d525eee
src/views/notification/notice/index.vue
@@ -43,8 +43,9 @@
            <el-table-column prop="updateTime" label="公告时间"></el-table-column>
            <el-table-column fixed="right" label="操作">
               <template #default="scope">
                  <el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">查看</el-button>
                  <el-button type="text" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
                  <el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
                  <el-button type="text" size="small" @click="table_del(scope.row, scope.$index)">删除</el-button>
               </template>
            </el-table-column>
         </el-table>
@@ -61,10 +62,10 @@
      </div>
   </div>
   <!-- <save-dialog v-if="dialog.save" ref="saveDialog" @success="addUserSuccess" @closed="dialog.save=false"></save-dialog> -->
   <save-dialog v-if="dialog.save" ref="saveDialog" @success="addUserSuccess" @closed="dialog.save=false"></save-dialog>
</template>
<script>
   // import saveDialog from './addUser'
   import saveDialog from './addNote'
   export default {
      name: "bakalaka",
      data(){
@@ -105,7 +106,7 @@
         this.getcategoryList();
      },
      components: {
         //saveDialog
         saveDialog
      },
      methods: {
         searchChange() {
@@ -124,7 +125,7 @@
            })
         },
         addUserSuccess() {
            this.getData();
         },
         getData() {
            var obj = {};
@@ -141,24 +142,40 @@
               }
            })
         },
         //删除
         table_del(row) {
            var that = this;
            this.$confirm(`确定将选择数据删除?`, '', {
               type: 'warning'
            }).then(() => {
               this.$HTTP.post("/api/blade-notify/notice/remove?ids="+row.id).then(res=> {
                  if(res.code == 200) {
                     that.$message.success("操作成功");
                     that.getData();
                  }
               })
            }).catch(() => {
            })
         },
         //添加
         addPerson(){
            this.dialog.save = true
            this.$nextTick(() => {
               this.$refs.saveDialog.open()
               this.$refs.saveDialog.open('add',this.categoryList);
            })
         },
         table_edit(row){
            this.dialog.save = true
            this.$nextTick(() => {
               this.$refs.saveDialog.open('edit').setData(row)
               this.$refs.saveDialog.open('edit',this.categoryList).setData(row)
            })
         },
         //查看
         table_show(row){
            this.dialog.save = true
            this.$nextTick(() => {
               this.$refs.saveDialog.open('show').setData(row)
               this.$refs.saveDialog.open('show',this.categoryList).setData(row)
            })
         },
         handleSelectionChange(selection) {