dev_202303
yujialong 2 years ago
parent d4366a467a
commit f3ac5af564
  1. 2
      src/utils/api.js
  2. 7
      src/views/join/index.vue
  3. 36
      src/views/order/AddOrder.vue
  4. 39
      src/views/parner/rate.vue
  5. 30
      src/views/parner/staff.vue
  6. 8
      src/views/parnerOperation/editor.js
  7. 336
      src/views/parnerOperation/learnMg.vue
  8. 14
      src/views/parnerOperation/mobileRole.vue
  9. 52
      src/views/parnerOperation/pcRole.vue
  10. 180
      src/views/parnerOperation/schemeSet.vue
  11. 52
      src/views/parnerOperation/staff.vue
  12. 1
      src/views/serve/projectList.vue

@ -28,6 +28,7 @@ export default {
bulkShipping: `nakadai/nakadai/orderOther/bulkShipping`,
getOrderOtherTime: `nakadai/nakadai/orderOther/getOrderOtherTime`,
refreshCache: `data/data/myDate/refreshCache`,
getPartnerTeamRates: `nakadai/nakadai/partner-team/getPartnerTeamRates`,
// 客户管理
delCustomers: `nakadai/nakadai/customer/delCustomers`,
@ -418,6 +419,7 @@ export default {
articleEnableOrDisable: `nakadai/nakadai/partner/article/management/articleEnableOrDisable`,
checkIfTheTitleIsRepeat: `nakadai/nakadai/partner/article/management/checkIfTheTitleIsRepeat`,
modifiedSort: `nakadai/nakadai/partner/article/management/modifiedSort`,
articleTopOperation: `nakadai/nakadai/partner/article/management/articleTopOperation`,
batchDeletionParnerFile: `nakadai/nakadai/partner/article/file/batchDeletion`,
findByIdParnerFile: `nakadai/nakadai/partner/article/file/findById`,
saveParnerFile: `nakadai/nakadai/partner/article/file/save`,

@ -12,12 +12,12 @@
<div class="inner">
<el-form class="form" ref="form" :model="form" :rules="rules">
<el-form-item prop="provinceId">
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity">
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" :disabled="provinceId" @change="getCity">
<el-option v-for="(item,index) in provinces" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="cityId">
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" :disabled="form.provinceId ? false : true">
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" :disabled="provinceId || (form.provinceId ? false : true)">
<el-option v-for="(item,index) in cities" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</el-form-item>
@ -46,6 +46,7 @@ import Setting from "@/setting"
export default {
data() {
return {
provinceId: this.$route.query.provinceId,
provinces: [],
cities: [],
isMobile: util.isMobile(),
@ -101,7 +102,7 @@ export default {
//
getCity(val){
this.$get(this.api.queryCity,{
provinceId: val
provinceId: this.form.provinceId
}).then(res => {
this.cities = res.list
if (val) this.form.cityId = ''

@ -116,7 +116,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="dispose || coursePermissions.find(e => e.status == 1) || (isAdd && coursePermissions.length)">
<template v-if="!viewDisabled && (dispose || coursePermissions.find(e => e.status == 1) || (isAdd && coursePermissions.length))">
<el-button v-if="coursePermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 0)">一键发货</el-button>
<el-button v-else v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 0)">取消全部发货</el-button>
</template>
@ -273,7 +273,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="dispose || dataPlatformPermissions.find(e => e.status == 1) || (isAdd && dataPlatformPermissions.length)">
<template v-if="!viewDisabled && (dispose || dataPlatformPermissions.find(e => e.status == 1) || (isAdd && dataPlatformPermissions.length))">
<el-button v-if="dataPlatformPermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 1)">一键发货</el-button>
<el-button v-else v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 1)">取消全部发货</el-button>
</template>
@ -451,7 +451,7 @@
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="dispose || valuePermissions.find(e => e.status == 1) || (isAdd && valuePermissions.length)">
<template v-if="!viewDisabled && (dispose || valuePermissions.find(e => e.status == 1) || (isAdd && valuePermissions.length))">
<el-button v-if="valuePermissions.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round @click="batchDeliver(1, 2)">一键发货</el-button>
<el-button v-else v-auth="'/order:发货'" type="primary" round @click="batchDeliver(0, 2)">取消全部发货</el-button>
</template>
@ -969,7 +969,8 @@ export default {
orderRepeat: [],
repeatMsg: '',
clients: [],
valueList: []
valueList: [],
rate: ''
};
},
watch: {
@ -1166,6 +1167,14 @@ export default {
this.dataPlatformPermissions = list.filter(i => i.authority === 0);
this.valuePermissions = list.filter(i => i.authority === 2);
},
//
getRate() {
this.$post(this.api.getPartnerTeamRates, {
teamId: this.form.teamId
}).then(({ teamRates }) => {
this.rate = teamRates.annualMarketingFee || 0
}).catch(res => {})
},
//
getClients() {
// const sid = this.$store.state.dataPer.find(e => e.permissionName === '')
@ -1201,7 +1210,7 @@ export default {
if (!e.periodOfUse || e.finalPrice === '') {
return false;
} else {
const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
@ -1222,7 +1231,7 @@ export default {
if (!e.periodOfUse || e.finalPrice === '' || !e.accountNum || e.settlementPrice === '') {
return false;
} else {
const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
@ -1242,7 +1251,7 @@ export default {
if (!e.periodOfUse || e.finalPrice === '') {
return false;
} else {
const curPurchase = +e.settlementPrice + (e.settlementPrice / 10)
const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
@ -1649,17 +1658,17 @@ export default {
this.coursePermissions
list.map(e => e.ship = ship)
if (this.editDisabled) {
this.refreshCache()
this.$post(this.api.bulkShipping, {
orderOthers: list
}).then(res => {})
// this.refreshCache()
// this.$post(this.api.bulkShipping, {
// orderOthers: list
// }).then(res => {})
}
},
// /-
handleDeliver(e, row) {
if (this.editDisabled) {
this.refreshCache()
this.$post(this.api.ship,row).then(res => {});
// this.refreshCache()
// this.$post(this.api.ship,row).then(res => {});
}
},
// 0
@ -1859,6 +1868,7 @@ export default {
teamChange() {
this.form.businessManagerId = ''
this.getBm()
this.getRate()
},
//
getBm() {

@ -5,7 +5,6 @@
<div>
<div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">城市合伙人区域管理</h6>
<el-button type="text" @click="addOrg" v-auth="'/parner:账号管理:添加分类'">添加分类</el-button>
</div>
<div style="height: 504px; max-height: 504px; overflow: auto">
@ -21,28 +20,6 @@
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span>
<span>
<!-- isTeam 0: 分类1: 团队 -->
<el-button
v-auth="'/parner:账号管理:添加分类'"
v-if="!data.isTeam"
type="text"
icon="el-icon-circle-plus-outline"
@click="() => addOrg(node, data)">
</el-button>
<el-button
v-auth="'/parner:账号管理:编辑分类'"
type="text"
icon="el-icon-edit-outline"
@click="() => editOrg(node, data)">
</el-button>
<el-button
v-auth="'/parner:账号管理:删除分类'"
type="text"
icon="el-icon-delete"
@click="() => delOrg(node, data)">
</el-button>
</span>
</span>
</el-tree>
</div>
@ -99,13 +76,13 @@
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
<el-table-column prop="phone" label="团队年费" align="center" min-width="120">
<template slot-scope="scope">
固定年费{{ scope.row.annualTeamFee}}w
固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + 'w' : '' }}
<el-button type="primary" size="mini" @click="editAnnualTeamFee(scope.row)">修改</el-button>
</template>
</el-table-column>
<el-table-column prop="phone" label="市场服务年费" align="center" min-width="120">
<template slot-scope="scope">
项目抽成{{ scope.row.annualMarketingFee}}%
项目抽成{{ scope.row.annualMarketingFee !== underfined ? scope.row.annualMarketingFee + '%' : '' }}
<el-button type="primary" size="mini" @click="editAnnualMarketingFee(scope.row)">修改</el-button>
</template>
</el-table-column>
@ -114,10 +91,10 @@
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
<el-dialog title="请设置费" :visible.sync="annualTeamFeeVisible" width="300px" class="dialog" :close-on-click-modal="false">
<el-dialog title="请设置团队年费" :visible.sync="annualTeamFeeVisible" width="300px" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="75px" style='margin-right: 0;'>
<el-form-item label="固定年费">
<el-input style="width: 150px;" type="number" v-model.trim="annualTeamFee" placeholder="请输入数字"></el-input>
<el-input style="width: 150px;" type="number" v-model.number="annualTeamFee" placeholder="请输入数字"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -125,10 +102,10 @@
<el-button type="primary" @click="submitAnnualTeamFee">确定</el-button>
</span>
</el-dialog>
<el-dialog title="请设置费" :visible.sync="annualMarketingFeeVisible" width="300px" class="dialog" :close-on-click-modal="false">
<el-dialog title="请设置市场服务年费" :visible.sync="annualMarketingFeeVisible" width="300px" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="75px" style='margin-right: 0;'>
<el-form-item label="固定年费">
<el-input style="width: 150px;" type="number" v-model.trim="annualMarketingFee" placeholder="请输入数字"></el-input>
<el-form-item label="项目抽成">
<el-input style="width: 150px;" type="number" v-model.number="annualMarketingFee" placeholder="请输入数字"></el-input> %
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -415,6 +392,7 @@ export default {
submitAnnualTeamFee() {
this.$post(this.api.editPartnerTeamRates, {
annualTeamFee: this.annualTeamFee,
annualMarketingFee: this.curRow.annualMarketingFee,
partnerId: this.curRow.partnerId,
teamId: this.curRow.teamId,
}).then(res => {
@ -433,6 +411,7 @@ export default {
submitAnnualMarketingFee() {
this.$post(this.api.editPartnerTeamRates, {
annualMarketingFee: this.annualMarketingFee,
annualTeamFee: this.curRow.annualTeamFee,
partnerId: this.curRow.partnerId,
teamId: this.curRow.teamId,
}).then(res => {

@ -107,25 +107,27 @@
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="团队负责人" align="center" min-width="100"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column>
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column>
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column>
<el-table-column v-if="!type" prop="roleName" label="授权角色" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="phone" label="费率" align="center" min-width="120">
<template slot-scope="scope">
团队年费{{ scope.row.annualTeamFee}},
市场服务年费{{ scope.row.annualMarketingFee}}
</template>
</el-table-column>
<template v-if="!type">
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="phone" label="费率" align="center" min-width="120">
<template slot-scope="scope">
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee}}w</p>
<p v-if="scope.row.annualMarketingFee">市场服务年费{{ scope.row.annualMarketingFee}}%</p>
</template>
</el-table-column>
</template>
<el-table-column prop="loginNumber" label="登录次数" align="center" width="120"></el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="120"></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button>
<el-button v-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" @click="transfer(scope.row)">转让超管</el-button>
@ -173,7 +175,7 @@
</span>
</el-dialog>
<el-dialog title="编辑合伙人'" :visible.sync="editVisible" width="400px" class="dialog" :close-on-click-modal="false">
<el-dialog title="编辑合伙人" :visible.sync="editVisible" width="400px" class="dialog" :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="60px" style='margin-right: 0;'>
<el-form-item prop="userName" label="姓名">
<el-input v-model.trim="form.userName" placeholder="请输入姓名"></el-input>
@ -616,7 +618,7 @@ export default {
}).then(({ pageList }) => {
this.chooseVisible = false
this.transferVisible = false
this.initData()
this.getOrg()
}).catch(err => {})
} else {
util.warningMsg('请选择成员!')
@ -637,7 +639,7 @@ export default {
this.expireTime = `${date.getFullYear()}-${util.preZero(date.getMonth() + 1)}-${util.preZero(date.getDate())} ${util.preZero(date.getHours())}:${util.preZero(date.getMinutes())}:${util.preZero(date.getMinutes())}`
this.parnerVisible = true
const cur = transfer ? curRow.partnerClassificationId : this.$refs.orgTree.getCurrentKey()
const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/backstage'}/#/join?accountId=${accountId}&id=${cur || ''}${transfer ? '&admin=1' : '&isTeam=1'}`
const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/backstage'}/#/join?accountId=${accountId}&id=${cur || ''}${transfer ? '&admin=1&provinceId=' + curRow.provinceId + '&cityId=' + curRow.cityId : '&isTeam=1'}`
//
this.link = link

@ -319,14 +319,14 @@ export default {
form.append('file', blobInfo.blob()),
Axios({
method: 'post',
url: Api.upload,
url: Api.fileUploadNakadai,
data: form,
headers: {
'Content-Type': 'multipart/form-data',
token: Util.local.get(Setting.tokenKey)
},
}).then(({ data }) => {
succFun(data.url)
succFun(data.filesResult.fileUrl)
}).catch(res => {})
},
//自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发
@ -349,14 +349,14 @@ export default {
fd.append("file", file);
Axios({
method: 'post',
url: Api.upload,
url: Api.fileupload,
data: fd,
headers: {
'Content-Type': 'multipart/form-data',
token: Util.local.get(Setting.tokenKey)
},
}).then(({ data }) => {
callback(data.url)
callback(data.data.filesResult.fileId)
}).catch(res => {})
}
//触发点击

@ -1,143 +1,153 @@
<template>
<div class="page">
<p class="page-name mb">文章详情</p>
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<el-form-item prop="title" label="标题">
<el-input
id="articleTitle"
style="width: 940px"
placeholder="请输入标题"
v-model="form.title"
clearable
maxlength="100"
@change="nameChange"
></el-input>
</el-form-item>
<div class="item-line">
<el-form-item prop="releaseTime" label="发布日期">
<el-date-picker
v-model="form.releaseTime"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
:clearable="false"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div>
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title" v-preventReClick @click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school" v-text="form.id ? '编辑文章' : '新建文章'"></span>
</div>
</div>
<div class="item-line">
<el-form-item prop="source" label="来源">
</el-card>
<div class="page">
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<el-form-item prop="title" label="标题">
<el-input
placeholder="请输入来源"
v-model.trim="form.source"
id="articleTitle"
style="width: 940px"
placeholder="请输入标题"
v-model="form.title"
clearable
maxlength="50"
class="inline-input"
maxlength="100"
@change="nameChange"
></el-input>
</el-form-item>
<el-form-item prop="author" label="作者">
<el-input
v-model="form.author"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="edit" label="编辑">
<div class="item-line">
<el-form-item prop="releaseTime" label="发布日期">
<el-date-picker
v-model="form.releaseTime"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
:clearable="false"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="source" label="来源">
<el-input
placeholder="请输入来源"
v-model.trim="form.source"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
<el-form-item prop="author" label="作者">
<el-input
v-model="form.author"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="edit" label="编辑">
<el-input
placeholder="请输入编辑"
v-model.trim="form.edit"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
<el-form-item prop="audit" label="审核">
<el-input
placeholder="请输入审核"
v-model.trim="form.audit"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="classificationId" label="所属分类">
<el-select style="width: 234px;" v-model="form.classificationId">
<template v-for="item in classifications">
<el-option
v-if="item.id"
:key="item.id"
:label="item.classificationName"
:value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button>
</el-form-item>
<el-form-item prop="author" label="主题标签">
<el-select style="width: 234px;" v-model="form.lableId" multiple>
<template v-for="item in labels">
<el-option
v-if="item.id"
:key="item.id"
:label="item.labelName"
:value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn" type="primary" @click="setLabel">设置</el-button>
</el-form-item>
</div>
<el-form-item prop="summary" label="摘要">
<el-input
placeholder="请输入编辑"
v-model.trim="form.edit"
style="width: 940px"
type="textarea"
v-model.trim="form.summary"
:rows="3"
clearable
maxlength="50"
class="inline-input"
></el-input>
</el-form-item>
<el-form-item prop="audit" label="审核">
<el-input
placeholder="请输入审核"
v-model.trim="form.audit"
clearable
maxlength="50"
class="inline-input"
></el-input>
<el-form-item prop="bannerImg" label="封面图">
<el-upload
class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif"
:on-change="changeFile"
:show-file-list="false"
:action="this.api.fileupload"
:auto-upload="false"
>
<img v-if="form.bannerImg" :src="form.bannerImg" class="avatar">
<div class="uploader-default" v-else>
<img class="plus" src="@/assets/img/plus.png" alt="">
<p>点击上传</p>
</div>
</el-upload>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="classificationId" label="所属分类">
<el-select style="width: 234px;" v-model="form.classificationId">
<template v-for="item in classifications">
<el-option
v-if="item.id"
:key="item.id"
:label="item.classificationName"
:value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button>
<el-form-item prop="mainBody" label="正文">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.mainBody" :init="editorConfig" />
</el-form-item>
<el-form-item prop="author" label="主题标签">
<el-select style="width: 234px;" v-model="form.lableId" multiple>
<template v-for="item in labels">
<el-option
v-if="item.id"
:key="item.id"
:label="item.labelName"
:value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn" type="primary" @click="setLabel">设置</el-button>
<el-form-item prop="file" label="文件上传">
<el-upload
:before-upload="fileBeforeUpload"
:on-remove="handleRemove"
:on-success="uploadSuccessFile"
:action="this.api.fileUploadNakadai"
:file-list="form.fileList"
:headers="headers"
>
<el-button>上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button>
</div>
<el-form-item prop="summary" label="摘要">
<el-input
style="width: 940px"
type="textarea"
v-model.trim="form.summary"
:rows="3"
clearable
></el-input>
</el-form-item>
<el-form-item prop="bannerImg" label="封面图">
<el-upload
class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif"
:on-change="changeFile"
:show-file-list="false"
:action="this.api.fileupload"
:auto-upload="false"
>
<img v-if="form.bannerImg" :src="form.bannerImg" class="avatar">
<div class="uploader-default" v-else>
<img class="plus" src="@/assets/img/plus.png" alt="">
<p>点击上传</p>
</div>
</el-upload>
</el-form-item>
<el-form-item prop="mainBody" label="正文">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.mainBody" :init="editorConfig" />
</el-form-item>
<el-form-item prop="file" label="文件上传">
<el-upload
:before-upload="fileBeforeUpload"
:on-remove="handleRemove"
:on-success="uploadSuccessFile"
:action="this.api.fileUploadNakadai"
:file-list="form.fileList"
:headers="headers"
>
<el-button>上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button>
</div>
<!-- 剪裁组件弹窗 -->
<el-dialog title="图片裁剪" append-to-body :visible.sync="cropperModel" width="1100px" :close-on-click-modal="false">
@ -258,9 +268,9 @@ export default {
releaseTime: [
{ required: true, message: '请选择发布日期', trigger: 'change' }
],
// bannerImg: [
// { required: true, message: '', trigger: 'change' }
// ],
bannerImg: [
{ required: true, message: '请上传封面图', trigger: 'change' }
],
mainBody: [
{ required: true, message: '请输入正文', trigger: 'blur' }
],
@ -299,12 +309,13 @@ export default {
next()
} else if (!this.pass) {
//
if (this.updateTime > 1) {
if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.submit(this.form.isRelease, next)
}).catch(() => {
console.log(55)
next()
})
} else {
@ -317,21 +328,30 @@ export default {
mounted() {
this.getArticle()
this.getLabel()
this.getClassification()
},
methods: {
//
//
getArticle() {
const { id } = this.form
id && this.$post(`${this.api.findByIdParnerArticle}?id=${id}`).then(({ data }) => {
data.lableId = data.lableId ? data.lableId.split(',').map(e => +e) : []
data.fileList.forEach(e => e.name = e.fileName)
this.form = data
this.getClassification(1)
}).catch(err => {})
},
//
getClassification() {
getClassification(detail) {
this.$post(`${this.api.queryClassificationByType}?typeId=${this.typeId}`).then(({ data }) => {
this.classifications = data
// id
if (detail) {
const id = this.form.classificationId
if (!data.find(e => e.id == id)) this.form.classificationId = ''
setTimeout(() => {
this.updateTime = 0
}, 500)
}
}).catch(err => {})
},
//
@ -396,8 +416,9 @@ export default {
} else {
this.classVisible = false
}
// id
if (!list.find(e => e.id == this.form.classificationId)) this.form.classificationId = ''
},
//
getLabel() {
@ -443,8 +464,6 @@ export default {
this.$post(this.api[row.id ? 'updateParnerLabel' : 'saveParnerLabel'], {
labelName: row.labelName,
id: row.id,
// editorId: this.userId,
// founderId: this.userId
}).then(res => {
showMsg && Util.successMsg((row.id ? '修改' : '新增') + '成功')
this.getLabel()
@ -573,7 +592,7 @@ export default {
},
//
handleRemove(e, fileList) {
e.id ? this.$post(`${this.api.delContentFile}?id=${e.id}`).then(res => {
e.id ? this.$post(`${this.api.batchDeletionParnerFile}?ids=${e.id}`).then(res => {
this.form.fileList = fileList
}).catch(res => {}) : (this.form.fileList = fileList)
},
@ -620,9 +639,8 @@ export default {
//
back() {
this.pass = true
const { updateTime } = this
//
if (updateTime > 1) {
if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
@ -634,17 +652,6 @@ export default {
this.$router.back()
}
},
//
updateFile(files, form, quoteId) {
files.map(e => {
this.$post(this.api.updateFile, {
id: e,
isRelease: form.isRelease,
quote: form.title,
quoteId
}).then(res => {}).catch(err => {})
})
},
//
submit(isRelease, next) {
if (this.submiting) return false
@ -653,18 +660,12 @@ export default {
if (this.nameRepeat) return Util.errorMsg('该标题已重复!')
//
if (isRelease) {
// if (!form.releaseTime) return Util.errorMsg('')
// if (!form.bannerImg ) return Util.errorMsg('')
// if (!form.mainBody) return Util.errorMsg('')
if (!form.releaseTime) return Util.errorMsg('请选择发布日期')
if (!form.classificationId) return Util.errorMsg('请选择所属分类')
if (!form.bannerImg ) return Util.errorMsg('请上传封面')
if (!form.mainBody) return Util.errorMsg('请输入正文')
}
// if (this.uploading) return Util.errorMsg('')
const { fileList, bannerImg } = form
const fileId = []
// idurlid
if (bannerImg) fileId.push(bannerImg.substr(bannerImg.lastIndexOf('/') + 1))
fileList && fileList.map(e => {
fileId.push(e[e.url ? 'url' : 'filePath'].substr(e[e.url ? 'url' : 'filePath'].lastIndexOf('/') + 1))
})
form.lableId = form.lableId.join(',')
form.releaseTime = Util.formatDate('yyyy-MM-dd', new Date(form.releaseTime)) //
@ -674,7 +675,6 @@ export default {
if (form.id) {
delete form.children
this.$post(this.api.updateParnerArticle, form).then(res => {
// this.updateFile(fileId, form, form.id)
Util.successMsg('修改成功')
next ? next() : this.$router.back()
}).catch(err => {
@ -682,18 +682,6 @@ export default {
})
} else {
this.$post(this.api.saveParnerArticle, form).then(({ data }) => {
this.updateFile(fileId, form, data)
//
// form.fileList.map(e => {
// this.$post(this.api.saveContentFile, {
// contentId: data,
// editorId: this.userId,
// founderId: this.userId,
// id: '',
// fileName: e.name,
// filePath: e.url
// }).then(res => {}).catch(err => {})
// })
Util.successMsg('创建成功')
next ? next() : this.$router.back()
}).catch(err => {
@ -829,7 +817,7 @@ $upload-lg-height: 102px;
}
.input-form {
&.model {
height: calc(100vh - 250px);
height: calc(100vh - 340px);
padding-right: 20px;
overflow: auto;
.el-form-item__label {

@ -24,9 +24,8 @@
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120" sortable="custom"></el-table-column>
<el-table-column prop="founderName" label="录入人" align="center" min-width="80"></el-table-column>
<el-table-column prop="editorName" label="修改人" align="center" min-width="80"></el-table-column>
<el-table-column prop="updateTime" label="修改日期" align="center" min-width="150"></el-table-column>
<el-table-column prop="createTime" label="发布日期" align="center" min-width="100"></el-table-column>
<el-table-column prop="learnerNumber" label="已学习人数" align="center" min-width="70"></el-table-column>
<el-table-column prop="updateTime" label="修改日期" align="center" min-width="150" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="发布日期" align="center" min-width="100" sortable="custom"></el-table-column>
<el-table-column prop="workNumber" label="状态" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
@ -37,6 +36,7 @@
<el-button v-auth="'/site/list:内容管理:文章管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/site/list:内容管理:文章管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-switch
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
@ -53,9 +53,7 @@
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import { mapMutations } from 'vuex'
export default {
data() {
return {
@ -80,7 +78,7 @@ export default {
pageSize: 10,
total: 0,
modifiedTimeSort: '',
publicationTimeSort: '',
releaseDateSort: 'desc',
classificationNameSort: '',
editTimeSort: '',
multipleSelection: [],
@ -107,7 +105,7 @@ export default {
querySource: 3, //(3. 4.)
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
releaseDateSort: this.releaseDateSort,
createTimeSort: this.releaseDateSort,
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
@ -189,7 +187,7 @@ export default {
this.sequenceSort = ''
}
}
if (column.prop === 'releaseTime') {
if (column.prop === 'createTime') {
this.releaseDateSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''

@ -21,18 +21,6 @@
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column show-overflow-tooltip prop="title" label="标题" align="center" min-width="150"></el-table-column>
<el-table-column prop="sequence" label="文章排序" align="center" min-width="110" sortable="custom">
<template slot-scope="scope">
<el-input
v-if="scope.row.editing"
class="squ-input"
v-model="scope.row.sequence"
></el-input>
<span v-else>{{ scope.row.sequence }}</span>
<i v-if="scope.row.editing" class="el-icon-check squ-icon" @click="submitSequence(scope.row)"></i>
<i v-else class="el-icon-edit squ-icon" @click="editSequence(scope.row)"></i>
</template>
</el-table-column>
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120" sortable="custom"></el-table-column>
<el-table-column prop="founderName" label="录入人" align="center" min-width="80"></el-table-column>
<el-table-column prop="editorName" label="修改人" align="center" min-width="80"></el-table-column>
@ -44,12 +32,17 @@
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<el-table-column prop="sequence" label="置顶" align="center" min-width="80" sortable="custom">
<template slot-scope="scope">
<i v-if="scope.row.isRelease" :class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']" @click="sticky(scope.row)"></i>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="210">
<template slot-scope="scope">
<el-button type="text" @click="sticky(scope.row)">置顶</el-button>
<el-button v-auth="'/site/list:内容管理:文章管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/site/list:内容管理:文章管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-switch
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
@ -92,10 +85,10 @@ export default {
page: 1,
pageSize: 10,
total: 0,
sequenceSort: '',
topSort: '',
classificationNameSort: '',
releaseDateSort: '',
editTimeSort: 'desc',
editTimeSort: '',
multipleSelection: [],
};
},
@ -118,7 +111,7 @@ export default {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
sequenceSort: this.sequenceSort,
topSort: this.topSort,
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
releaseDateSort: this.releaseDateSort,
@ -126,12 +119,12 @@ export default {
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}).then(({ data }) => {
data.records.forEach(e => {
}).then(({ page, total }) => {
page.forEach(e => {
e.editing = false
})
this.list = data.records
this.total = +data.total
this.list = page
this.total = total
}).catch(err => {})
},
currentChange(val) {
@ -195,7 +188,7 @@ export default {
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
this.topSort = ''
}
}
if (column.prop === 'updateTime') {
@ -203,7 +196,7 @@ export default {
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
this.topSort = ''
}
}
if (column.prop === 'releaseTime') {
@ -211,11 +204,11 @@ export default {
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.sequenceSort = ''
this.topSort = ''
}
}
if (column.prop === 'sequence') {
this.sequenceSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
this.topSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
@ -240,7 +233,7 @@ export default {
},
//
sticky(row) {
this.$post(`${this.api.modifiedSort}?articleId=${row.id}&sequenceNumber=1`).then(res => {
this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => {
this.initData()
}).catch(res => {})
},
@ -257,8 +250,13 @@ export default {
margin-left: 10px;
}
.squ-icon {
margin-left: 5px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
}
/deep/.squ-input {
width: auto;

@ -1,65 +1,86 @@
<template>
<div class="page">
<p class="page-name mb">方案设置</p>
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<div class="item-line">
<el-form-item prop="title" label="标题">
<div>
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title" v-preventReClick @click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school" v-text="form.id ? '编辑方案' : '新建方案'"></span>
</div>
</div>
</el-card>
<div class="page">
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<div class="item-line">
<el-form-item prop="title" label="标题">
<el-input
placeholder="请输入标题"
v-model.trim="form.title"
clearable
maxlength="30"
class="inline-input"
></el-input>
</el-form-item>
<el-form-item prop="classificationId" label="所属分类">
<el-select style="width: 234px;" v-model="form.classificationId">
<template v-for="item in classifications">
<el-option
v-if="item.id"
:key="item.id"
:label="item.classificationName"
:value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button>
</el-form-item>
</div>
<el-form-item prop="applicableMajor" label="适用专业">
<el-input
style="width: 940px"
type="textarea"
v-model.trim="form.applicableMajor"
:rows="3"
clearable
></el-input>
</el-form-item>
<el-form-item prop="schemeIntroduction" label="方案简介">
<el-input
style="width: 940px"
type="textarea"
v-model.trim="form.schemeIntroduction"
:rows="3"
clearable
></el-input>
</el-form-item>
<el-form-item prop="product" label="产品">
<el-input
placeholder="请输入标题"
v-model.trim="form.title"
style="width: 940px"
type="textarea"
v-model.trim="form.product"
:rows="3"
clearable
maxlength="30"
class="inline-input"
></el-input>
</el-form-item>
<el-form-item prop="classificationId" label="所属分类">
<el-select style="width: 234px;" v-model="form.classificationId">
<template v-for="item in classifications">
<el-option
v-if="item.id"
:key="item.id"
:label="item.classificationName"
:value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button>
<el-form-item prop="schemeFile" label="方案文件">
<el-upload
:before-upload="fileBeforeUpload"
:on-success="uploadSuccessFile"
:action="this.api.fileUploadNakadai"
:file-list="fileList"
:limit="1"
:on-exceed="handleExceed"
:headers="headers"
>
<el-button>上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button>
</div>
<el-form-item prop="applicableMajor" label="适用专业">
<el-input
style="width: 940px"
type="textarea"
v-model.trim="form.applicableMajor"
:rows="3"
clearable
></el-input>
</el-form-item>
<el-form-item prop="product" label="产品">
<el-input
style="width: 940px"
type="textarea"
v-model.trim="form.product"
:rows="3"
clearable
></el-input>
</el-form-item>
<el-form-item prop="schemeFile" label="方案文件">
<el-upload
:before-upload="fileBeforeUpload"
:on-success="uploadSuccessFile"
:action="this.api.fileUploadNakadai"
:file-list="fileList"
:headers="headers"
>
<el-button>上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button>
</div>
<el-dialog title="所属分类设置" :visible.sync="classVisible" width="500px" :close-on-click-modal="false" class="manage-dia" :before-close="closeClass">
@ -114,8 +135,10 @@ export default {
applicableMajor: '',
classificationId: '',
product: '',
fileName: '',
schemeFile: '',
title: '',
schemeIntroduction: ''
},
fileList: [],
rules: {
@ -128,6 +151,9 @@ export default {
applicableMajor: [
{ required: true, message: '请输入适用专业', trigger: 'blur' }
],
schemeIntroduction: [
{ required: true, message: '请输入方案简介', trigger: 'blur' }
],
product: [
{ required: true, message: '请输入产品', trigger: 'blur' }
],
@ -169,7 +195,7 @@ export default {
next()
} else if (!this.pass) {
//
if (this.updateTime > 1) {
if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
@ -185,7 +211,6 @@ export default {
}
},
mounted() {
this.getClassification()
this.getArticle()
},
methods: {
@ -193,14 +218,23 @@ export default {
getArticle() {
const { id } = this.form
id && this.$post(`${this.api.findByIdScheme}?id=${id}`).then(({ data }) => {
if (data.schemeFile) this.fileList = [{name: data.schemeFile, url: data.schemeFile}]
if (data.schemeFile) this.fileList = [{name: data.fileName, url: data.schemeFile}]
this.form = data
this.getClassification(1)
}).catch(err => {})
},
//
getClassification() {
getClassification(detail) {
this.$post(`${this.api.queryClassificationByType}?typeId=3`).then(({ data }) => {
this.classifications = data
// id
if (detail) {
const id = this.form.classificationId
if (!data.find(e => e.id == id)) this.form.classificationId = ''
this.$nextTick(() => {
this.updateTime = 0
})
}
}).catch(err => {})
},
//
@ -265,6 +299,8 @@ export default {
} else {
this.classVisible = false
}
// id
if (!list.find(e => e.id == this.form.classificationId)) this.form.classificationId = ''
},
//
@ -272,15 +308,21 @@ export default {
this.uploading++
},
//
uploadSuccessFile(res) {
this.form.schemeFile = res.filesResult.fileUrl
uploadSuccessFile({ filesResult }) {
this.form.fileName = filesResult.originalFileName
this.form.schemeFile = filesResult.fileUrl
},
//
handleExceed(files, fileList) {
Util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
//
back() {
this.pass = true
const { updateTime } = this
//
if (updateTime > 1) {
if (this.updateTime) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
@ -308,19 +350,19 @@ export default {
if (this.submiting) return false
const form = JSON.parse(JSON.stringify(this.form))
if (!form.title) return Util.errorMsg('请填写标题')
if (this.nameRepeat) return Util.errorMsg('该标题已重复!')
//
if (isRelease) {
// if (!form.releaseTime) return Util.errorMsg('')
// if (!form.bannerImg ) return Util.errorMsg('')
// if (!form.mainBody) return Util.errorMsg('')
if (!form.classificationId) return Util.errorMsg('请选择所属分类')
if (!form.applicableMajor ) return Util.errorMsg('请输入适用专业')
if (!form.schemeIntroduction) return Util.errorMsg('请输入方案简介')
if (!form.product) return Util.errorMsg('请输入产品')
if (!form.schemeFile) return Util.errorMsg('请上传方案文件')
}
// if (this.uploading) return Util.errorMsg('')
form.isRelease = isRelease
this.submiting = true
if (form.id) {
delete form.children
this.$post(this.api.updateScheme, form).then(res => {
Util.successMsg('修改成功')
next ? next() : this.$router.back()
@ -464,7 +506,7 @@ $upload-lg-height: 102px;
}
.input-form {
&.model {
height: calc(100vh - 250px);
height: calc(100vh - 340px);
padding-right: 20px;
overflow: auto;
.el-form-item__label {

@ -21,18 +21,6 @@
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column show-overflow-tooltip prop="title" label="标题" align="center" min-width="150"></el-table-column>
<el-table-column prop="sequence" label="文章排序" align="center" min-width="110" sortable="custom">
<template slot-scope="scope">
<el-input
v-if="scope.row.editing"
class="squ-input"
v-model="scope.row.sequence"
></el-input>
<span v-else>{{ scope.row.sequence }}</span>
<i v-if="scope.row.editing" class="el-icon-check squ-icon" @click="submitSequence(scope.row)"></i>
<i v-else class="el-icon-edit squ-icon" @click="editSequence(scope.row)"></i>
</template>
</el-table-column>
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120" sortable="custom"></el-table-column>
<el-table-column prop="founderName" label="录入人" align="center" min-width="80"></el-table-column>
<el-table-column prop="editorName" label="修改人" align="center" min-width="80"></el-table-column>
@ -44,12 +32,17 @@
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<el-table-column prop="sequence" label="置顶" align="center" min-width="80" sortable="custom">
<template slot-scope="scope">
<i v-if="scope.row.isRelease" :class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']" @click="sticky(scope.row)"></i>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="210">
<template slot-scope="scope">
<el-button type="text" @click="sticky(scope.row)">置顶</el-button>
<el-button v-auth="'/site/list:内容管理:文章管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/site/list:内容管理:文章管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-switch
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
@ -91,10 +84,10 @@ export default {
page: 1,
pageSize: 10,
total: 0,
sequenceSort: '',
topSort: '',
classificationNameSort: '',
releaseDateSort: '',
editTimeSort: 'desc',
editTimeSort: '',
multipleSelection: [],
};
},
@ -117,7 +110,7 @@ export default {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
sequenceSort: this.sequenceSort,
topSort: this.topSort,
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
releaseDateSort: this.releaseDateSort,
@ -125,12 +118,12 @@ export default {
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}).then(({ data }) => {
data.records.forEach(e => {
}).then(({ page, total }) => {
page.forEach(e => {
e.editing = false
})
this.list = data.records
this.total = +data.total
this.list = page
this.total = total
}).catch(err => {})
},
currentChange(val) {
@ -194,7 +187,7 @@ export default {
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
this.topSort = ''
}
}
if (column.prop === 'updateTime') {
@ -202,7 +195,7 @@ export default {
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
this.topSort = ''
}
}
if (column.prop === 'releaseTime') {
@ -210,11 +203,11 @@ export default {
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.sequenceSort = ''
this.topSort = ''
}
}
if (column.prop === 'sequence') {
this.sequenceSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
this.topSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
@ -239,7 +232,7 @@ export default {
},
//
sticky(row) {
this.$post(`${this.api.modifiedSort}?articleId=${row.id}&sequenceNumber=1`).then(res => {
this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => {
this.initData()
}).catch(res => {})
},
@ -256,8 +249,13 @@ export default {
margin-left: 10px;
}
.squ-icon {
margin-left: 5px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
}
/deep/.squ-input {
width: auto;

@ -358,6 +358,7 @@ export default {
}
this.currentRow.projectManage.projectName = this.projectName;
this.currentRow.projectManage.projectId = "";
this.currentRow.projectManage.founder = 0
this.currentRow.projectJudgmentList.forEach(i => {
i.projectId = "";
});

Loading…
Cancel
Save