|
@@ -29,9 +29,9 @@
|
|
|
<sc-upload v-model="formData.cover"></sc-upload>
|
|
<sc-upload v-model="formData.cover"></sc-upload>
|
|
|
<div class="el-form-item-msg"></div>
|
|
<div class="el-form-item-msg"></div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="文档属性" prop="attribute">
|
|
|
|
|
|
|
+ <el-form-item label="文档属性" prop="attribute" v-loading="channelState">
|
|
|
<el-checkbox-group v-model="formData.attribute">
|
|
<el-checkbox-group v-model="formData.attribute">
|
|
|
- <el-checkbox border :value="item.key" :label="item.key" v-for="(item,indx) in channelData" :key="indx">{{ item.name }}</el-checkbox>
|
|
|
|
|
|
|
+ <el-checkbox border :value="item.code" :label="item.code" v-for="(item,indx) in channelData" :key="indx">{{ item.name }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
|
<div class="el-form-item-msg"></div>
|
|
<div class="el-form-item-msg"></div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -82,6 +82,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
categoryData:[],
|
|
categoryData:[],
|
|
|
|
|
+ channelState:false,
|
|
|
deptsProps:{
|
|
deptsProps:{
|
|
|
value: "id",
|
|
value: "id",
|
|
|
label: "name"
|
|
label: "name"
|
|
@@ -114,6 +115,7 @@ export default {
|
|
|
this.mode = mode;
|
|
this.mode = mode;
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.getCategory()
|
|
this.getCategory()
|
|
|
|
|
+ this.getChannel()
|
|
|
if (mode == 'add') {
|
|
if (mode == 'add') {
|
|
|
this.formData = {
|
|
this.formData = {
|
|
|
view:0,
|
|
view:0,
|
|
@@ -127,6 +129,15 @@ export default {
|
|
|
setData(data){
|
|
setData(data){
|
|
|
this.formData = JSON.parse(JSON.stringify(data));
|
|
this.formData = JSON.parse(JSON.stringify(data));
|
|
|
},
|
|
},
|
|
|
|
|
+ async getChannel(){
|
|
|
|
|
+ this.channelState = true;
|
|
|
|
|
+ var resp = await this.$API.service.dic.get({"type":"article"});
|
|
|
|
|
+ this.channelState = false;
|
|
|
|
|
+ if (resp.code == 0) {
|
|
|
|
|
+ return this.$message.error(resp.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.channelData = resp.data;
|
|
|
|
|
+ },
|
|
|
async getCategory(){
|
|
async getCategory(){
|
|
|
var resp = await this.$API.category.list.get({"type":2});
|
|
var resp = await this.$API.category.list.get({"type":2});
|
|
|
if (resp.code == 0) {
|
|
if (resp.code == 0) {
|