<template><el-dialogtitle="发布":visible.sync="dialogVisible"width="40%":before-close="handleClose"><el-form label-width="80px"><el-form-item label="项目名"><el-input v-model="project_name" placeholder="请输入项目名"></el-input></el-form-item><el-form-item v-for="item in AweMepro" :label="item.name"><el-input v-if="item.widget.type == 'input'" v-model="form[item.key]" placeholder="名称"></el-input><!--          <el-select v-else-if="item.widget.type == 'category-select'" v-model="form[item.key]" placeholder="">--><!--            <el-option v-for="row in item.widget.categories" :label="row.title" :value="row.value"></el-option>--><!--          </el-select>--><!--          <el-cascader--><!--            v-else-if="item.widget.type == 'category-select'"--><!--            v-model="form[item.key]"--><!--            :options="item.widget.categories"--><!--            @change="handleChange"--><!--          >--><!--          </el-cascader>--><el-cascader v-else-if="item.widget.type == 'category-select'" v-model="categoryValue":options="item.widget.categories" @change="handleChange"><template slot-scope="{ node, data }"><span>{{ data.title }}</span></template></el-cascader><el-switch v-else-if="item.widget.type == 'boolean-select'" v-model="form[item.key]" text="是否原创"></el-switch><el-tag v-else-if="item.widget.type == 'tag-input'" v-for="row in form[item.key]" size="medium" closable>{{row}}</el-tag><el-date-pickerv-else-if="item.widget.type == 'date-time'"v-model="form[item.key]"type="datetime"placeholder="选择日期时间"value-format="timestamp"></el-date-picker><el-upload :action="action"v-else-if="item.widget.type == 'picture'"disabled><img v-if="form[item.key]" :src="form[item.key]" class="avatar"><i v-else class="el-icon-plus avatar-uploader-icon"></i></el-upload><el-upload :action="action"v-else-if="item.widget.type == 'cover-pictures'"disabled><img v-if="form[item.key]" :src="form[item.key]" class="avatar"><i v-else class="el-icon-plus avatar-uploader-icon"></i></el-upload></el-form-item></el-form><!-- <div v-for="(item,index) in this.itemsBian"><el-input v-if="item.widget.type='input'"  type="item.widget.type" placeholder="请输入名称" v-model="item.name"></el-input></div>--><span slot="footer" class="dialog-footer"><el-button @click="dialogVisible = false">取 消</el-button><el-button type="primary" @click="ListAccept">确 定</el-button></span></el-dialog>
</template>
<script>
importEditTags from "@/views/content/ContentComponents/EditTags";
import EditUploads from "@/views/content/ContentComponents/EditUploads";
import MyInput from "@/views/order/accoutTask/MyInput";
import {getAction, postActionXing, putAction} from "@/api";export default {name: "ContentPublish",components: {EditTags,EditUploads,MyInput},data() {return {value: '',categoryValue: [],/*品牌名*/brand_id: null,project_id: 0,scope_id: 0,/*content_id*/content_type: 0,/*项目名*/project_name: '',dialogVisible: false,form: {},UserToken: {},info: null,/*视频上传地址*/VedioUrl: '',/*图片上传地址*/ImageUrl: '',/*用来存储account的数值*/accountListPro: {},/*存放despro的数值*/differentPro: {},/*存放AME的数值*/AweMepro: [],/*存放accountlist数值*/accountListBrand: {},/*存放detail*/detailPro: {},/*存放user*/userPro: {},itemsBian: {},};},methods: {publish(id) {this.dialogVisible = true;/*任务详情的一个数据接口  {{host}}/task/1*/getAction("/task/" + id + "/release").then(res => {console.log(res, 8888)if (res.code == 404) {this.$message({message: res.msg,type: 'error'});this.dialogVisible = false;}/*存储accout的数据*//*  this.accountListPro = res.data.account*//*返回的示例数据brand_id: "12305"name: "123"pavg: nullplugin_icon_url: "https://fenfa1.csztv.com/testapi/imgs/bilibili.png"plugin_key: "bilibili"plugin_name: "Bilibili"remote_account_id: "302970"status: true*//*存储account_brand的数值*/this.accountListBrand = res.data.account_brand/*返回对应的实例值* videoAuditUsers: Array(3)wordAuditUsers: Array(3)*/this.AweMepro = res.data.account_plugins/*返回对应的实例值* description: nullkey: "name"name: "名称"unified: truevalue_schema: Objectwidget: Object* */this.differentPro = res.data.different_catalogs/** 302970: Objectcategory: ""intro: ""name: ""original: ""quiz-publish: ""tags: ""trans_reason: ""upload-image: ""* */this.detailPro = res.data.account_detail/** account_name: (...)avatar_url: (...)brand_id: (...)brand_name: (...)default_categories: (...)d efault_category_names: (...)error_code: (...)error_message: (...)extensions: (...)form_items: (...)id: (...)plugin_icon_url: (...)plugin_key: (...)plugin_name: (...)type: (...)*//**/this.userPro = res.data.users/*返回示例代码* access_token: (...)account: (...)business_module: (...)column: (...)department_id: (...)expire_time: (...)ff_login_time: (...)ff_open_id: (...)ff_time: (...)ff_token: (...)id: (...)login_at: (...)name: (...)role: (...)*/this.info = res.data;/*本id1用来判断是数据接口或者是图文数据接口*/this.content_type = res.data.content_type/*本id表示的是多少行的一个数据id*/this.scope_id = id/*存入的数值是所需要的一个品牌id的数据值*/this.brand_id = res.data.account.brand_id/*getActionXing("/internal/plugins/" + this.detailPro.plugin_key + "/catalog-items/different").then(res => {console.log(res)this.itemsBian = res.data.bilibiliconsole.log(this.itemsBian)this.itemsBian.map((value, index) => {console.log(value.widget.type)})})*/this.form = {"name": res.data.title,"tags": res.data.tag,"upload-image": res.data.thumbnail,"cover-pictures": res.data.thumbnail,}})},handleClose(done) {this.$confirm('确认关闭?').then(_ => {this.dialogVisible = false}).catch(_ => {this.dialogVisible = false});},ListAccept() {//如果当前是视频资源if (this.content_type == 1) {   //视频this.form['quiz-publish'] = this.form['quiz-publish'] / 1000;this.info.different_catalogs[this.info.account.remote_account_id] = this.form;var url = "/internal/users/current/video-url/distribute";var data = {"brand_id": this.info.account.brand_id,"name": this.info.name,"video_url": this.info.resource,"account_ids": [this.info.account.remote_account_id],"unify_catalogs": {},"different_catalogs": this.info.different_catalogs,}postActionXing(url, data).then(res => {if (res.data) {putAction("/task/" + this.scope_id + "/project", {project_id: res.data}).then(res => {if (res.code == 0) {this.$message({message: '发布成功!',type: 'success'});putAction('/task/' + this.scope_id + '/status', {status: 4}).then(res => {})this.$emit("ok")this.dialogVisible = false;}})}});}/*如果当前是图文资源*/else if (this.content_type == 2) {  //图文/*cover-pictures*/var wordAuditUsers = [];for (var i = 0; i < this.info.account_brand.wordAuditUsers.length; i++) {wordAuditUsers.push(this.info.account_brand.wordAuditUsers[i].id);}this.form['quiz-publish'] = this.form['quiz-publish'] / 100;this.info.different_catalogs[this.info.account.remote_account_id] = this.form;var url = "/internal/users/current/word-projects/distribute";var data = {"brand_id": this.info.account.brand_id,"title": this.info.title,"name": this.info.name,"body": this.info.resource,/*"video_url": this.info.resource,*/"account_ids": [this.info.account.remote_account_id],"unify_catalogs": {},"different_catalogs": this.info.different_catalogs,/* "brand_id": this.brand_id,"title": this.project_name,"body": this.info.resource,"account_ids": [this.info.account.remote_account_id],"audit_user_ids": wordAuditUsers,"unify_catalogs": {},"different_catalogs": this.different_catalogs*/}postActionXing(url, data).then(res => {if (res.data) {putAction("/task/" + this.scope_id + "/project", {project_id: res.data}).then(res => {console.log(res)putAction('/task/' + this.scope_id + '/status', {status: 4}).then(res => {})})}})}/*创建我的视频接口 第一个参数自己手动录入 第二个参数取值任务详情的接口接口*/// postActionXing("/internal/users/current/video-projects",{//   brand_id:this.account.brand_id,name:this.project_name// }).then(//     res=>{//       this.project_id=res.data//       console.log(this.project_id)//       /*传入四个个参数 传入title icon_path transcode paths 设置传入的参数 *///       postActionXing("/internal/users/current/video-projects/"+this.project_id+"/videos",{//         title: this.content.title,//         icon_path:this.content.resource,//         transcode: true,//         paths: [this.content.thumbnail]//       })//     }// )/*创建我的图文接口 进行数据的传输*/// postActionXing("/internal/users/current/word-projects",{//   brand_id:this.account.brand_id,name:this.project_name,body:this.content.resource// }).then(//     res=>{//       this.project_id=res.data//       console.log(this.project_id)//     }// )/*获取图文详情*/// getActionXing("/internal/users/current/brands/word-projects/"+this.project_id).then(res=>{//   console.log(res)// })/*图文详情 图文修改 图文分发接口*/// getActionXing("/internal/users/current/word-projects").then(res=>{//   console.log(res)//   this.dialogVisible=false// })},handleChange(e) {this.form.category = e;}}
};
</script>

工作295:发布逻辑处理相关推荐

  1. 全新 HTML 5.1 工作草案发布

    W3C 发布了一份关于 HTML 5.1 的新工作草案.该草案描述了当前开发状态和前一个主要版本 HTML 5 之间的改变.在2012年9月到今年5月6日之间共有超过 40 项的改动被列出来.例如 W ...

  2. 网络安全基础 之 防火墙 双机热备、防火墙类型、组网方式、工作模式、逻辑区域划分

    目录 概念: 特征: 作用: 基本功能: 防火墙的分类: 性能划分: 设备形态分类: 技术划分: 包过滤防火墙: ACL七元组: 逻辑区域: 配置方式: 自定义安全区域: 删除自定义安全区域: 防火墙 ...

  3. 应届生找工作的基本逻辑

    脱不下的长衫,逃不掉的就业 文章目录 前言 一.基本常识 1.骨感的现实 1.1 毕业即失业的现实 1.2 主要影响上大学的原因 2.打工人的自我修养 2.1 毕业大学生的基本定位 2.2 学历的背后 ...

  4. 敏捷项目管理敏捷工作之发布计划

    发布计划 发布:指发布出来用于生产的一组可用的产品特性.无需包含所有的路线图的功能,至少要包括最小的可上市的特性集. 计划发布:确定下一组最小可上市的特性集,并确认团队能够行动起来将最迫切的产品推出的 ...

  5. 培养工作中的逻辑思维能力

    **培养我的工作思维能力** 每天可以找出不同的问题,并且多问为什么,并且沿着问题可能发生的方向进行深入思考, 一条条整理 : 永远不要让自己的嘴比脑子更快, 也不是说嘴尽量不要说, 这里是想说先锻炼 ...

  6. 工作292:数据绑定逻辑处理

    },confirmAssociation() {if(this.selected!="") {putAction(this.url.put + '/' + this.task_id ...

  7. 工作217:重置逻辑

    第一步 按钮 <el-button @click="resetQuery" icon="el-icon-refresh">重置</el-but ...

  8. RabbitMQ工作模式Publish/Subscribe发布订阅,test测试代码

    RabbitMQ有以下几种工作模式 : 1.Work queues  工作队列 2.Publish/Subscribe 发布订阅 3.Routing      路由 4.Topics        通 ...

  9. 液压系统中逻辑阀的工作原理和作用

    液压系统中逻辑阀可能有些人很难理解.我们甚至似乎无法就如何称呼他们达成一致.许多人将它们描述为"插装式"阀门.这并没有错,因为它们实际上是插装阀.甚至制造商通常也这样称呼它们.我还 ...

最新文章

  1. mysql的字符串函数大全_MySQL的字符串函数大全
  2. 美女主播变大妈:在bug翻车现场说测试策略
  3. Linux环境Elasticsearch6.xxx 之kibana可视化工具操作索引
  4. 李维说他跳槽了,那我以后也不是Borland的Fans了?
  5. 2台电脑一根网线传文件_黑龙江工程专用网线报价,黑电源线配件厂家
  6. doctrine2 mysql_Doctrine2-完整创建数据库
  7. mysql php 类 缓存_记录一个实用的PHP缓存类
  8. S7-200SMART案例分析——伺服选型(一)
  9. Word交叉引用连续引用多个参考文献
  10. java 正则表达式 检测数学公式是否正确_java 正则表达式 检测数学公式是否正
  11. 图扑国风设计 3D 可视化 | 科技与文化碰撞炫酷”火花“
  12. 嵌入式系统原理及应用(复习总结)
  13. 背包问题(旅游记得带零钱)
  14. 用户授权中@Secured,@PreAuthorize,@PostAuthorize,@PreFilter,@PostFilter这五个注解的使用
  15. 平分肥宅快乐水(C++)
  16. C++ Concurrency in Action, Second Edition阅读笔记(一、二章)
  17. 2000元平板电脑推荐2023 2000元左右平板电脑哪款好
  18. 【新手入门必看】git 和 github 介绍
  19. 自体脂肪填充苹果肌硬块多久消
  20. 音视频开发系列1:音视频开发基本概念

热门文章

  1. 使用Python和MetaTrader在5分钟内开始构建您的交易策略
  2. js判断对象还是数组
  3. linux系统编程:IO读写过程的原子性操作实验
  4. hdu1466(dp)
  5. 什么从什么写短句_从什么到从什么造句
  6. 又拍云 php5月18号那,又拍云文档中心
  7. 在c语言中,以r方式不能打开并不存在的文件,C语言文件选择题
  8. php如何制定跳转到app原生页面,js实现界面向原生界面发消息并跳转功能
  9. linux下tree命令详解
  10. VC下加载多种格式图片的方法总结