|
@@ -30,8 +30,7 @@
|
|
|
<el-input :disabled="disabled" v-model="form.publish_unit" placeholder="请输入发布单位"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="图片" prop="img_url" v-if="form.type == '0' && form.col_name == '图片新闻'">
|
|
|
- <el-image v-if="disabled" :src="form.img_url"></el-image>
|
|
|
- <upload v-else :limit="9" :data="form.img_url" type="img_url" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
|
|
|
+ <upload :limit="9" :data="form.img_url" type="img_url" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="视频" prop="file_url" v-if="form.type == '0' && form.col_name == '科技培训'">
|
|
|
<video v-if="disabled" :src="form.file_url" controls="controls" style="height: 395px; width: 100%;">
|
|
@@ -74,7 +73,9 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-col :span="24" style="text-align:center;">
|
|
|
- <el-button type="primary" @click="submitDraft('form')">保存</el-button>
|
|
|
+ <el-button v-if="user.type == '0' || user.type == '1' || (user.type == '4' && form.status == '0')" type="primary" @click="submitDraft('form')"
|
|
|
+ >保存</el-button
|
|
|
+ >
|
|
|
<el-button type="danger" @click="resetForm()">取消</el-button>
|
|
|
</el-col>
|
|
|
</el-form>
|
|
@@ -121,7 +122,6 @@ export default {
|
|
|
],
|
|
|
// 发布
|
|
|
form: {},
|
|
|
- imgList: [],
|
|
|
// 规则
|
|
|
rules: {
|
|
|
col_name: [{ required: true, message: '请选择栏目', trigger: 'blur' }],
|
|
@@ -143,13 +143,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
search() {
|
|
|
- if (this.newform) {
|
|
|
- console.log(this.newform);
|
|
|
-
|
|
|
+ if (this.newform.id) {
|
|
|
this.$set(this, `form`, this.newform);
|
|
|
if (this.user.type == '4' && (this.newform.status == '1' || this.newform.status == '2')) {
|
|
|
this.disabled = true;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.form = { type: '0' };
|
|
|
}
|
|
|
},
|
|
|
resetForm() {
|