Commit 51fa4096 by 杨北旺

攻略

1 parent 0ff15fd0
......@@ -1909,6 +1909,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz",
......@@ -1917,6 +1962,28 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -13348,75 +13415,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",
......
......@@ -17,7 +17,7 @@
props: {
excludeMenus: {
type: Array,
default: () => ['code','video']
default: () => ['code']
},
boxHeight:{
type: Number,
......
<template>
<div class="ctnr">
<div class="operate-wrap">
<span class="table-title">攻略分类列表</span>
<div class="operate-btn">
<el-button size="small" type="primary" @click="addClass(1)">新增</el-button>
</div>
</div>
<GLTable ref="tableRef" :pageConf="pageConf" :searchForm="searchFormObj" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<GLDialog class="dialog_wrap" okText="提交" :title="modalTitle" mode="mid" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" @onOk="onOk" @onCancel="handleClose" :close-on-click-modal="false">
<div class="wrap">
<div class="labelName">
<span class="require">*</span>
分类名称:
</div>
<el-input class="intClass" v-model="categoryName" maxlength="10" @input="intClassName" placeholder="请输入"></el-input>
</div>
</GLDialog>
<el-dialog title="提示" width="576px" @close="cancelTop" :visible.sync="dialogVisible">
<div class="warning_body">
<div class="header">
<i class="el-icon-warning"></i>
<span class="title">确定置顶此分类?</span>
<span class="cont">置顶后,分类数据在列表栏和小程序攻略专区里均优先展示</span>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button :size="size" @click="cancelTop">取 消</el-button>
<el-button :size="size" type="primary" @click="handleTop">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'classManagerIndex',
data() {
return {
searchFormObj: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '分类名称',
prop: 'strategyName'
},
{
label: '创建时间',
prop: 'createdDate'
}
]
},
buttonList: [
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addClass(2, row.scope)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
listeners: {
click: row => this.delClass(row.scope)
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text',
fn: '置顶'
},
listeners: {
click: row => this.topClass(row.scope)
}
}
],
isVisible: false,
modalTitle: '新增',
categoryName: '',
dialogVisible: false
}
},
components: {},
mounted() {},
methods: {
topClass() {},
delClass() {},
addClass(type) {
this.isVisible = true
this.modalTitle = type == 2 ? '编辑' : '新增'
},
handleClose() {
this.isVisible = false
},
onOk() {
this.handleClose()
},
intClassName(e) {
this.categoryName = e
},
cancelTop() {
this.dialogVisible = false
},
handleTop() {
this.cancelTop()
}
}
}
</script>
<style scoped lang="scss">
.ctnr {
background-color: #fff;
padding: 12px 20px;
.operate-wrap {
.table-title {
font-weight: 600;
font-size: 16px;
color: #333333;
}
}
.dialog_wrap {
.wrap {
display: flex;
align-items: center;
.labelName {
width: 154px;
text-align: right;
.require {
color: #eb4e4e;
}
}
.intClass {
width: 284px;
height: 32px;
}
}
}
.warning_body {
.maxtitle {
font-weight: 600;
font-size: 20px;
color: #333333;
}
.header {
display: flex;
flex-direction: column;
align-items: center;
i {
color: #fdb757;
font-size: 48px;
}
.title {
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 24px;
margin: 8px 0 4px 0;
}
.cont {
font-weight: 400;
font-size: 14px;
color: #666666;
margin-bottom: 20px;
}
}
}
/deep/ .el-dialog__footer {
text-align: center;
}
}
</style>
\ No newline at end of file
......@@ -33,6 +33,7 @@ export default {
return {
myRule: {
strategyName: [{required: true, message: '请输入攻略名称', trigger: 'change'}],
categoryName: [{required: true, message: '请选择分类名称', trigger: 'change'}],
strategyImg: [{
required: true, validator: (rule, value, callback) => {
if (this.formObj.coverArr?.length != 1) {
......@@ -49,7 +50,8 @@ export default {
coverArr: [],
strategyImg: '',
strategyName: '',
content: ''
content: '',
categoryName:''
},
formData: [
{
......@@ -61,6 +63,12 @@ export default {
isDisabled: false
},
{
label: '分类名称',
name: 'categoryName',
type: 'select',
isDisabled: false
},
{
label: '攻略宣传图',
name: 'strategyImg',
addHtml: 'coverSlot'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!