|  | @@ -1,33 +1,47 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div>
 | 
	
		
			
				|  |  |      <!-- 搜索标题 -->
 | 
	
		
			
				|  |  | -     <auth auths="news/add">
 | 
	
		
			
				|  |  | -       <div @click="openTeaching('create')" class="newBand">新建</div>
 | 
	
		
			
				|  |  | +    <auth auths="news/add">
 | 
	
		
			
				|  |  | +      <div @click="openTeaching('create')" class="newBand">新建</div>
 | 
	
		
			
				|  |  |      </auth>
 | 
	
		
			
				|  |  |      <!-- 搜索标题 -->
 | 
	
		
			
				|  |  | -    <save-form :inline="true"
 | 
	
		
			
				|  |  | -             class="searchForm"
 | 
	
		
			
				|  |  | -             saveKey="contentKnowledge"
 | 
	
		
			
				|  |  | -             @submit="search"
 | 
	
		
			
				|  |  | -             :model="searchForm">
 | 
	
		
			
				|  |  | +    <save-form
 | 
	
		
			
				|  |  | +      :inline="true"
 | 
	
		
			
				|  |  | +      class="searchForm"
 | 
	
		
			
				|  |  | +      saveKey="contentKnowledge"
 | 
	
		
			
				|  |  | +      @submit="search"
 | 
	
		
			
				|  |  | +      :model="searchForm"
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  |        <el-form-item prop="organIdList">
 | 
	
		
			
				|  |  | -        <select-all class="multiple" clearable
 | 
	
		
			
				|  |  | -                   filterable
 | 
	
		
			
				|  |  | -                   collapse-tags
 | 
	
		
			
				|  |  | -                   multiple
 | 
	
		
			
				|  |  | -                   v-model.trim="searchForm.organIdList"
 | 
	
		
			
				|  |  | -                   placeholder="请选择分部">
 | 
	
		
			
				|  |  | -          <el-option v-for="(item,index) in selects.branchs"
 | 
	
		
			
				|  |  | -                    :key="index"
 | 
	
		
			
				|  |  | -                    :label="item.name"
 | 
	
		
			
				|  |  | -                    :value="item.id"></el-option>
 | 
	
		
			
				|  |  | +        <select-all
 | 
	
		
			
				|  |  | +          class="multiple"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          filterable
 | 
	
		
			
				|  |  | +          collapse-tags
 | 
	
		
			
				|  |  | +          multiple
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.organIdList"
 | 
	
		
			
				|  |  | +          placeholder="请选择分部"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="(item, index) in selects.branchs"
 | 
	
		
			
				|  |  | +            :key="index"
 | 
	
		
			
				|  |  | +            :label="item.name"
 | 
	
		
			
				|  |  | +            :value="item.id"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |          </select-all>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item prop="subType">
 | 
	
		
			
				|  |  | -        <el-select v-model="searchForm.subType"
 | 
	
		
			
				|  |  | -                   clearable
 | 
	
		
			
				|  |  | -                   placeholder="请选择知识类别">
 | 
	
		
			
				|  |  | -          <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model="searchForm.subType"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          placeholder="请选择知识类别"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="item in typeList"
 | 
	
		
			
				|  |  | +            :key="item.id"
 | 
	
		
			
				|  |  | +            :label="item.name"
 | 
	
		
			
				|  |  | +            :value="item.id"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |            <!-- <el-option label="演奏小技巧"
 | 
	
		
			
				|  |  |                       :value="1"></el-option>
 | 
	
		
			
				|  |  |            <el-option label="乐理基础"
 | 
	
	
		
			
				|  | @@ -39,120 +53,141 @@
 | 
	
		
			
				|  |  |          </el-select>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item prop="subjectId">
 | 
	
		
			
				|  |  | -          <el-select v-model="searchForm.subjectId" clearable filterable placeholder="请选择声部">
 | 
	
		
			
				|  |  | -            <el-option v-for="item in selects.subjects" :value="item.id" :label="item.name" :key="item.id"></el-option>
 | 
	
		
			
				|  |  | -          </el-select>
 | 
	
		
			
				|  |  | -        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model="searchForm.subjectId"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          filterable
 | 
	
		
			
				|  |  | +          placeholder="请选择声部"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="item in selects.subjects"
 | 
	
		
			
				|  |  | +            :value="item.id"
 | 
	
		
			
				|  |  | +            :label="item.name"
 | 
	
		
			
				|  |  | +            :key="item.id"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  | +        </el-select>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  |          <el-button native-type="submit" type="danger">搜索</el-button>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |      </save-form>
 | 
	
		
			
				|  |  |      <!-- 列表 -->
 | 
	
		
			
				|  |  |      <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">
 | 
	
		
			
				|  |  | -            <img class="bannerImg"
 | 
	
		
			
				|  |  | -                 :src="scope.row.coverImage"
 | 
	
		
			
				|  |  | -                 alt="">
 | 
	
		
			
				|  |  | +            <img class="bannerImg" :src="scope.row.coverImage" alt="" />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </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="跳转链接">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" label="跳转链接">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            <overflow-text width="100%" :text="scope.row.linkUrl + '/' + scope.row.id"></overflow-text>
 | 
	
		
			
				|  |  | +            <overflow-text
 | 
	
		
			
				|  |  | +              width="100%"
 | 
	
		
			
				|  |  | +              :text="scope.row.linkUrl + '/' + scope.row.id"
 | 
	
		
			
				|  |  | +            ></overflow-text>
 | 
	
		
			
				|  |  |              <!-- {{ scope.row.linkUrl + '/' + scope.row.id }} -->
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="remark"
 | 
	
		
			
				|  |  | -                         label="是否使用">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="remark" label="是否使用">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.status == 1 ? '是' : '否' }}
 | 
	
		
			
				|  |  | +            {{ scope.row.status == 1 ? "是" : "否" }}
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="createTime"
 | 
	
		
			
				|  |  | -                         label="创建时间">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="createTime" label="创建时间">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '--' }}
 | 
	
		
			
				|  |  | +            {{
 | 
	
		
			
				|  |  | +              scope.row.createTime ? scope.row.createTime.split(" ")[0] : "--"
 | 
	
		
			
				|  |  | +            }}
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="subType"
 | 
	
		
			
				|  |  | -                         label="知识类别">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="subType" label="知识类别">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  |              {{ formatSubType(scope.row.subType) }}
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="subjectName"
 | 
	
		
			
				|  |  | -                         label="所属声部">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="subjectName" label="所属声部">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  |              {{ scope.row.subjectName }}
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="order"
 | 
	
		
			
				|  |  | -                         label="排序">
 | 
	
		
			
				|  |  | +        <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="remark" label="适用分部">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  |              <overflow-text :text="scope.row.organNameList"></overflow-text>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         label="操作">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" label="操作">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            <el-button @click="openTeaching('update', scope.row)"
 | 
	
		
			
				|  |  | -                       v-if="!scope.row.memo || permission('banner/copyrightbtn')"
 | 
	
		
			
				|  |  | -                       type="text">修改</el-button>
 | 
	
		
			
				|  |  | -            <div style="display: inline-block"
 | 
	
		
			
				|  |  | -                 v-if="!scope.row.memo || permission('banner/copyrightbtn')">
 | 
	
		
			
				|  |  | -              <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>
 | 
	
		
			
				|  |  | +            <div>
 | 
	
		
			
				|  |  | +              <auth auths="news/update" style="margin-left: 10px">
 | 
	
		
			
				|  |  | +                <el-button
 | 
	
		
			
				|  |  | +                  @click="openTeaching('update', scope.row)"
 | 
	
		
			
				|  |  | +                  v-if="!scope.row.memo || permission('banner/copyrightbtn')"
 | 
	
		
			
				|  |  | +                  type="text"
 | 
	
		
			
				|  |  | +                  >修改</el-button
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  | +                <div
 | 
	
		
			
				|  |  | +                  style="display: inline-block"
 | 
	
		
			
				|  |  | +                  v-if="!scope.row.memo || permission('banner/copyrightbtn')"
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  | +                  <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
 | 
	
		
			
				|  |  | +                  >
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +              </auth>
 | 
	
		
			
				|  |  | +              <auth auths="news/del" style="margin-left: 10px">
 | 
	
		
			
				|  |  | +                <el-button
 | 
	
		
			
				|  |  | +                  @click="onDel(scope.row)"
 | 
	
		
			
				|  |  | +                  v-if="!scope.row.memo || permission('banner/copyrightbtn')"
 | 
	
		
			
				|  |  | +                  type="text"
 | 
	
		
			
				|  |  | +                  >删除</el-button
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  | +              </auth>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            <el-button @click="onDel(scope.row)"
 | 
	
		
			
				|  |  | -                       v-if="!scope.row.memo || permission('banner/copyrightbtn')"
 | 
	
		
			
				|  |  | -                       type="text">删除</el-button>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  |        </el-table>
 | 
	
		
			
				|  |  |        <pagination
 | 
	
		
			
				|  |  | -       saveKey="contentKnowledge"
 | 
	
		
			
				|  |  | -      sync :total.sync="pageInfo.total"
 | 
	
		
			
				|  |  | -                  :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | -                  :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | -                  :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | -                  @pagination="getList" />
 | 
	
		
			
				|  |  | +        saveKey="contentKnowledge"
 | 
	
		
			
				|  |  | +        sync
 | 
	
		
			
				|  |  | +        :total.sync="pageInfo.total"
 | 
	
		
			
				|  |  | +        :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | +        :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | +        :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | +        @pagination="getList"
 | 
	
		
			
				|  |  | +      />
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import { newsList, newsUpdate, newsDel, newsTypeList } from '@/api/contentManager'
 | 
	
		
			
				|  |  | -import pagination from '@/components/Pagination/index'
 | 
	
		
			
				|  |  | -import store from '@/store'
 | 
	
		
			
				|  |  | -import cleanDeep from 'clean-deep'
 | 
	
		
			
				|  |  | -import { permission } from '@/utils/directivePage'
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +  newsList,
 | 
	
		
			
				|  |  | +  newsUpdate,
 | 
	
		
			
				|  |  | +  newsDel,
 | 
	
		
			
				|  |  | +  newsTypeList,
 | 
	
		
			
				|  |  | +} from "@/api/contentManager";
 | 
	
		
			
				|  |  | +import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | +import store from "@/store";
 | 
	
		
			
				|  |  | +import cleanDeep from "clean-deep";
 | 
	
		
			
				|  |  | +import { permission } from "@/utils/directivePage";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  name: 'knowledge',
 | 
	
		
			
				|  |  | +  name: "knowledge",
 | 
	
		
			
				|  |  |    components: {
 | 
	
		
			
				|  |  | -    pagination
 | 
	
		
			
				|  |  | +    pagination,
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  data () {
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        searchForm: {
 | 
	
		
			
				|  |  |          organIdList: [],
 | 
	
	
		
			
				|  | @@ -166,100 +201,104 @@ export default {
 | 
	
		
			
				|  |  |          limit: 10, // 限制显示条数
 | 
	
		
			
				|  |  |          page: 1, // 当前页
 | 
	
		
			
				|  |  |          total: 1, // 总条数
 | 
	
		
			
				|  |  | -        page_size: [10, 20, 40, 50] // 选择限制显示条数
 | 
	
		
			
				|  |  | +        page_size: [10, 20, 40, 50], // 选择限制显示条数
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        typeList: [], // 子分类
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  async mounted () {
 | 
	
		
			
				|  |  | -    this.$store.dispatch('setSubjects')
 | 
	
		
			
				|  |  | -    await newsTypeList({ parentId: 7 }).then(res => {
 | 
	
		
			
				|  |  | -      if(res.code == 200) {
 | 
	
		
			
				|  |  | -        this.typeList = res.data
 | 
	
		
			
				|  |  | +  async mounted() {
 | 
	
		
			
				|  |  | +    this.$store.dispatch("setSubjects");
 | 
	
		
			
				|  |  | +    await newsTypeList({ parentId: 7 }).then((res) => {
 | 
	
		
			
				|  |  | +      if (res.code == 200) {
 | 
	
		
			
				|  |  | +        this.typeList = res.data;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  |      this.$store.dispatch("setBranchs");
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      search() {
 | 
	
		
			
				|  |  | -      this.pageInfo.page = 1
 | 
	
		
			
				|  |  | -      this.getList()
 | 
	
		
			
				|  |  | +      this.pageInfo.page = 1;
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    permission (str) {
 | 
	
		
			
				|  |  | -      return permission(str)
 | 
	
		
			
				|  |  | +    permission(str) {
 | 
	
		
			
				|  |  | +      return permission(str);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getList () {
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  |        let params = {
 | 
	
		
			
				|  |  | -        clientName: 'manage',
 | 
	
		
			
				|  |  | -        organIdList: this.searchForm.organIdList ? this.searchForm.organIdList.join(',') : null,
 | 
	
		
			
				|  |  | +        clientName: "manage",
 | 
	
		
			
				|  |  | +        organIdList: this.searchForm.organIdList
 | 
	
		
			
				|  |  | +          ? this.searchForm.organIdList.join(",")
 | 
	
		
			
				|  |  | +          : null,
 | 
	
		
			
				|  |  |          subType: this.searchForm.subType,
 | 
	
		
			
				|  |  |          subjectId: this.searchForm.subjectId,
 | 
	
		
			
				|  |  |          rows: this.pageInfo.limit,
 | 
	
		
			
				|  |  |          page: this.pageInfo.page,
 | 
	
		
			
				|  |  | -        type: 7
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      newsList(cleanDeep(params)).then(res => {
 | 
	
		
			
				|  |  | +        type: 7,
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      newsList(cleanDeep(params)).then((res) => {
 | 
	
		
			
				|  |  |          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 = 7
 | 
	
		
			
				|  |  | -      params.pageType = type
 | 
	
		
			
				|  |  | +      params.type = 7;
 | 
	
		
			
				|  |  | +      params.pageType = type;
 | 
	
		
			
				|  |  |        this.$router.push({
 | 
	
		
			
				|  |  | -        path: '/contentManager/contentOperation',
 | 
	
		
			
				|  |  | -        query: params
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +        path: "/contentManager/contentOperation",
 | 
	
		
			
				|  |  | +        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
 | 
	
		
			
				|  |  | -      let tempStr = ['停用', '启用']
 | 
	
		
			
				|  |  | +      let tempStr = ["停用", "启用"];
 | 
	
		
			
				|  |  |        newsUpdate({
 | 
	
		
			
				|  |  |          id: row.id,
 | 
	
		
			
				|  |  | -        status: status
 | 
	
		
			
				|  |  | -      }).then(res => {
 | 
	
		
			
				|  |  | +        status: status,
 | 
	
		
			
				|  |  | +      }).then((res) => {
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  | -          this.$message.success(tempStr[status] + '成功')
 | 
	
		
			
				|  |  | -          this.getList()
 | 
	
		
			
				|  |  | +          this.$message.success(tempStr[status] + "成功");
 | 
	
		
			
				|  |  | +          this.getList();
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -          this.$message.error(res.msg)
 | 
	
		
			
				|  |  | +          this.$message.error(res.msg);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      formatSubType(val) {
 | 
	
		
			
				|  |  | -      let tempName = null
 | 
	
		
			
				|  |  | -      this.typeList.forEach(item => {
 | 
	
		
			
				|  |  | -        if(item.id == val) {
 | 
	
		
			
				|  |  | -          tempName = item.name
 | 
	
		
			
				|  |  | +      let tempName = null;
 | 
	
		
			
				|  |  | +      this.typeList.forEach((item) => {
 | 
	
		
			
				|  |  | +        if (item.id == val) {
 | 
	
		
			
				|  |  | +          tempName = item.name;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -      return tempName
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +      return tempName;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    filters: {
 | 
	
	
		
			
				|  | @@ -270,11 +309,10 @@ export default {
 | 
	
		
			
				|  |  |      //     3: '乐器保养',
 | 
	
		
			
				|  |  |      //     4: '乐曲演奏展示'
 | 
	
		
			
				|  |  |      //   }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      //   return template[val]
 | 
	
		
			
				|  |  |      // }
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang="scss" scoped>
 | 
	
		
			
				|  |  |  .bannerImg {
 |