明梦爽
2022-01-26 894dd034da2c3b466f0ee80db36342d4b0d01ebc
src/components/Administrator/Main.vue
@@ -1,16 +1,18 @@
<template>
  <div>
    <!-- 级联选择器 -->
    <div class="block">
      <el-cascader
        v-model="value"
        :options="options"
        clearable
        filterable
        :getCheckedNodes="true"
        @change="handleChange">
      </el-cascader>
    </div>
    <el-row class="block">
      <el-col :span="4">
        <el-cascader
          v-model="value"
          :options="options"
          clearable
          filterable
          :getCheckedNodes="true"
          @change="handleChange">
        </el-cascader>
      </el-col>
    </el-row>
    <div>
      <el-card class="box-card">
        <el-row :gutter="40">
@@ -114,6 +116,8 @@
      gettable:true,  //获取表格的显示
      visible: false,
      editDialogVisible:false,  //控制修改对话框的布尔值
      AdDialogVisible:false,  //超管登录对话框
      Ad:{ username:'',password:'' }, //超管对象
      editForm:{},  //查询到的新闻对象,目前仅供修改使用
      newsCategoryId:1, //先存一个小标题id
      tableData:[],   //新闻列表对象
@@ -267,7 +271,7 @@
        title:this.editForm.title
      }
      update(data).then(res=>{
        // console.log('dsadasas',res);
        console.log('dsadasas',res);
        if (res.code == 200) {
          this.editDialogVisible =false;
          this.$message.success('修改新闻成功!')
@@ -348,6 +352,10 @@
    look(id){
      this.$router.push({path:'news',query:{id:id}})
    },
    //超管登录对话框
    showAdDialog(){
      this.AdDialogVisible = true
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.currentPage = val;