|
@@ -15,6 +15,9 @@
|
|
|
.detail .ant-form-item {
|
|
|
margin-bottom: 10px !important;
|
|
|
}
|
|
|
+.role-item .ant-form-item {
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="scss" scoped>
|
|
|
.home-item {
|
|
@@ -45,7 +48,7 @@
|
|
|
// width:70%
|
|
|
// }
|
|
|
// } /*>=1100的设备*/
|
|
|
-@media (min-width: 1280px) {
|
|
|
+@media (min-width: 1600px) {
|
|
|
.home-item {
|
|
|
border-style: solid;
|
|
|
border-width: 1px;
|
|
@@ -213,6 +216,8 @@ a {
|
|
|
<div class="bh">字数:0 </div> -->
|
|
|
<span style="color: black; fontSize: 16px;padding-top:10px;display:block;width:100%" @click.stop>
|
|
|
{{ items.createTime }}
|
|
|
+ <a style="float:right" @click.stop="addRole(items)"> 添加角色</a>
|
|
|
+ <a style="float:right;margin-right:15px" @click.stop="writeScript(items)"> 编写剧本</a>
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -230,10 +235,7 @@ a {
|
|
|
/>
|
|
|
</div>
|
|
|
<div v-else style="width:100%;height:400px;display:flex;justify-content: center;align-items: center;">
|
|
|
- <img
|
|
|
- src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <a-empty />
|
|
|
</div>
|
|
|
<a-modal title="添加素材" v-model="visible" :maskClosable="false" :width="800">
|
|
|
<template slot="footer">
|
|
@@ -324,6 +326,110 @@ a {
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
</a-modal>
|
|
|
+ <a-modal title="脚本内容" v-model="visibleScript" :maskClosable="false" :width="800">
|
|
|
+ <template slot="footer">
|
|
|
+ <a-button key="back" @click="closeScript">取消</a-button>
|
|
|
+ <a-button key="submit" type="primary" @click="handleOkScript">
|
|
|
+ 确定
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ <a-list
|
|
|
+ v-if="comments.length"
|
|
|
+ :dataSource="comments"
|
|
|
+ :header="`${comments.length} ${comments.length > 1 ? 'replies' : 'reply'}`"
|
|
|
+ itemLayout="horizontal"
|
|
|
+ >
|
|
|
+ <a-list-item slot="renderItem" slot-scope="item">
|
|
|
+ <a-comment :author="item.author" :avatar="item.avatar" :content="item.content" :datetime="item.datetime">
|
|
|
+ </a-comment>
|
|
|
+ </a-list-item>
|
|
|
+ </a-list>
|
|
|
+ <a-comment>
|
|
|
+ <a-select v-model="author" slot="avatar" placeholder="请选择审核状态">
|
|
|
+ <a-select-option value="情节描述">情节描述</a-select-option>
|
|
|
+ <a-select-option value="角色1">角色1</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <div slot="content">
|
|
|
+ <a-form-item>
|
|
|
+ <a-textarea :rows="4" @change="handleChange" :value="value"></a-textarea>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item>
|
|
|
+ <a-button htmlType="submit" :loading="submitting" @click="handleSubmit" type="primary">
|
|
|
+ Add Comment
|
|
|
+ </a-button>
|
|
|
+ </a-form-item>
|
|
|
+ </div>
|
|
|
+ </a-comment>
|
|
|
+ <a-form :form="form"> </a-form>
|
|
|
+ </a-modal>
|
|
|
+ <a-modal title="添加角色" v-model="visibleRole" :maskClosable="false" :width="1000" class="role-item">
|
|
|
+ <template slot="footer">
|
|
|
+ <a-button key="back" @click="visibleRole = false">取消</a-button>
|
|
|
+ <a-button key="submit" type="primary" @click="visibleRole = false">
|
|
|
+ 确定
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ <a-form :form="formRole">
|
|
|
+ <a-row :gutter="24" style="border-bottom:1px solid #f2f2f2">
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item
|
|
|
+ :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
+ :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
|
|
|
+ label="姓名"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ placeholder="请输入姓名"
|
|
|
+ v-decorator="[
|
|
|
+ 'name' // 给表单赋值或拉取表单时,该input对应的key
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item
|
|
|
+ :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
+ :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
|
|
|
+ label="性别"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ placeholder="请输入性别"
|
|
|
+ v-decorator="[
|
|
|
+ 'sex' // 给表单赋值或拉取表单时,该input对应的key
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="18">
|
|
|
+ <a-form-item
|
|
|
+ :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
+ :wrapper-col="{ xs: { span: 24 }, sm: { span: 17 } }"
|
|
|
+ label="角色描述"
|
|
|
+ >
|
|
|
+ <a-textarea
|
|
|
+ placeholder="请输入描述"
|
|
|
+ v-decorator="[
|
|
|
+ 'introduction' // 给表单赋值或拉取表单时,该input对应的key
|
|
|
+ ]"
|
|
|
+ :autosize="{ minRows: 3, maxRows: 10 }"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="24" :style="{ textAlign: 'right' }">
|
|
|
+ <a-button type="primary" @click="handleOkRole">
|
|
|
+ 添加角色
|
|
|
+ </a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ <a-list itemLayout="horizontal" :dataSource="listData">
|
|
|
+ <a-list-item slot="renderItem" slot-scope="item">
|
|
|
+ <a-list-item-meta :description="item.introduction">
|
|
|
+ <a slot="title">{{ item.name }}</a>
|
|
|
+ <a-avatar slot="avatar" src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
|
|
+ </a-list-item-meta>
|
|
|
+ </a-list-item>
|
|
|
+ </a-list>
|
|
|
+ </a-modal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -355,8 +461,14 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ author: '情节描述',
|
|
|
+ comments: [],
|
|
|
+ submitting: false,
|
|
|
+ value: '',
|
|
|
projectId: '',
|
|
|
inputVisible: false,
|
|
|
+ visibleScript: false,
|
|
|
+ visibleRole: false,
|
|
|
inputValue: '',
|
|
|
labelCol: {
|
|
|
xs: {
|
|
@@ -391,6 +503,8 @@ export default {
|
|
|
},
|
|
|
detail: false,
|
|
|
form: this.$form.createForm(this),
|
|
|
+ formRole: this.$form.createForm(this),
|
|
|
+ listData: [],
|
|
|
tags: [],
|
|
|
refuseFile: [],
|
|
|
refuseReason: '',
|
|
@@ -422,7 +536,8 @@ export default {
|
|
|
size: 4,
|
|
|
repeat: false,
|
|
|
excellent: 0,
|
|
|
- code: ''
|
|
|
+ code: '',
|
|
|
+ dramaId: null
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -436,28 +551,7 @@ export default {
|
|
|
return y + '-' + MM + '-' + d
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- dirImg() {
|
|
|
- let date = new Date()
|
|
|
- let y = date.getFullYear()
|
|
|
- let MM = date.getMonth() + 1
|
|
|
- MM = MM < 10 ? '0' + MM : MM
|
|
|
- let d = date.getDate()
|
|
|
- d = d < 10 ? '0' + d : d
|
|
|
-
|
|
|
- return 'image/' + y + '-' + MM + '-' + d + '/'
|
|
|
- },
|
|
|
- dirVideo() {
|
|
|
- let date = new Date()
|
|
|
- let y = date.getFullYear()
|
|
|
- let MM = date.getMonth() + 1
|
|
|
- MM = MM < 10 ? '0' + MM : MM
|
|
|
- let d = date.getDate()
|
|
|
- d = d < 10 ? '0' + d : d
|
|
|
-
|
|
|
- return 'video/' + y + '-' + MM + '-' + d + '/'
|
|
|
- }
|
|
|
- },
|
|
|
+ computed: {},
|
|
|
created() {
|
|
|
this.ipagination.pageSize = 8
|
|
|
},
|
|
@@ -466,6 +560,62 @@ export default {
|
|
|
},
|
|
|
watch: {},
|
|
|
methods: {
|
|
|
+ handleSubmit() {
|
|
|
+ if (!this.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ this.submitting = true
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.submitting = false
|
|
|
+ this.comments = [
|
|
|
+ ...this.comments,
|
|
|
+ {
|
|
|
+ author: this.author,
|
|
|
+ avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
|
|
+ content: this.value,
|
|
|
+ datetime: moment().fromNow()
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ this.value = ''
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
+ handleChange(e) {
|
|
|
+ this.value = e.target.value
|
|
|
+ },
|
|
|
+ writeScript(item) {
|
|
|
+ this.visibleScript = true
|
|
|
+ },
|
|
|
+ addRole(item) {
|
|
|
+ this.visibleRole = true
|
|
|
+ this.dramaId = item.id
|
|
|
+ this.roleList()
|
|
|
+ },
|
|
|
+ roleList() {
|
|
|
+ getAction('/ctop/dramaRoleInfo/list', { dramaId: this.dramaId }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.listData = res.result.records
|
|
|
+ } else {
|
|
|
+ this.listData = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleOkRole() {
|
|
|
+ this.formRole.validateFieldsAndScroll((err, values) => {
|
|
|
+ if (err) {
|
|
|
+ // 这里做逻辑处理
|
|
|
+ } else {
|
|
|
+ postAction('/ctop/dramaRoleInfo/list', params).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.roleList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.listData.push({ name: values.name, sex: values.sex, introduction: values.introduction })
|
|
|
+ this.formRole.resetFields()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleInputConfirm() {
|
|
|
const inputValue = this.inputValue
|
|
|
let tags = this.tags
|
|
@@ -507,6 +657,13 @@ export default {
|
|
|
handleInputChange(e) {
|
|
|
this.inputValue = e.target.value
|
|
|
},
|
|
|
+ handleOkScript() {
|
|
|
+ this.visibleScript = false
|
|
|
+ },
|
|
|
+ closeScript() {
|
|
|
+ this.visibleScript = false
|
|
|
+ this.comments = []
|
|
|
+ },
|
|
|
handleOk() {
|
|
|
this.form.validateFieldsAndScroll((err, values) => {
|
|
|
if (err) {
|