Commit 1980ac3b by hank

更换作品和日程

parent 64f67ddd
......@@ -16,7 +16,7 @@ export function getTempList(page: number) {
}
}
/** 获取我的视片列表 */
/** 获取我的作品列表 */
export function getDeviceList(page: number, showTemplate: string = '') {
return async (dispatch, state) => {
const oldState = state().counter
......
......@@ -9,7 +9,7 @@ export function setTempList(list: any[], count: number) {
}
}
/** 修改我的视片数据 */
/** 修改我的作品数据 */
export function setDeviceList(list: any[], count: number) {
return {
list,
......
......@@ -15,6 +15,7 @@ export interface IUpdateDeviceInfo {
equipmentId: string
equipmentName: string
equipmentUrl: string
equipmentDescribe: string
equipmentResolution: string
equipmentStyle: 'CROSSWISE' | 'LENGTHWAYS' | 'DOUBLECROSSWISE' | 'DOUBLELENGTHWAYS'
}
......@@ -50,11 +51,11 @@ class UsersApi extends ApiClient {
return this.request({ method: 'GET', url: `/template/get/info/${id}` })
}
/** 创建视片 */
/** 创建作品 */
createFilm(filmName: string, filmDescribe: string, templateId: string) {
return this.request({ url: '/template/add/film', data: { filmDescribe, filmName, templateId } })
}
/** 修改视片信息 */
/** 修改作品信息 */
updateFilmName(filmName: string, filmDescribe: string, filmId: string) {
return this.request({
url: '/template/update/film/base/info',
......@@ -62,21 +63,21 @@ class UsersApi extends ApiClient {
})
}
/** 获取视片详情列表 */
/** 获取作品详情列表 */
getFilmDetailList(id: string, page: number) {
return this.request({ method: 'GET', url: `/template/get/equipment/list/${id}?p=${page}&c=50` })
}
/** 获取视片详情 */
/** 获取作品详情 */
getFilmDetailInfo(id: string) {
return this.request({ method: 'GET', url: `/template/get/film/info/${id}` })
}
/** 获取视片下设备列表详情 */
/** 获取作品下设备列表详情 */
getFilmDeviceList(FilmId: string) {
return this.request({ url: `/template/get/equipment/list/${FilmId}`, data: { p: 1000, c: 10 } })
}
/** 获取我的视片列表 */
/** 获取我的作品列表 */
getMyFilmsList(page: number, templateShow: string) {
return this.request({
url: `/myfilm/get/list?p=${page}&c=10`,
......@@ -144,7 +145,7 @@ class UsersApi extends ApiClient {
})
}
/** 删除视片 */
/** 删除作品 */
removeFilm(filmId: string) {
return this.request({
method: 'GET',
......
......@@ -55,6 +55,7 @@ class App extends Component {
'pages/home/tempaltes/film_preview',
'pages/home/tempaltes/film_edit',
'pages/home/tempaltes/film_edit_info',
'pages/home/film/schedule_list/index',
'pages/home/film/schedule_add/index',
'pages/home/film/schedule_add/components/films/index',
'pages/home/film/schedule_add/components/device/index',
......@@ -90,11 +91,17 @@ class App extends Component {
},
{
pagePath: 'pages/home/film/index',
text: '视片及日程',
text: '作品',
iconPath: './assets/images/film.png',
selectedIconPath: './assets/images/film_ac.png'
},
{
pagePath: 'pages/home/film/schedule_list/index',
text: '日程',
iconPath: './assets/images/schedule.png',
selectedIconPath: './assets/images/schedule-selcet.png'
},
{
pagePath: 'pages/home/user/index',
text: '个人中心',
iconPath: './assets/images/personal.png',
......
......@@ -5,6 +5,10 @@
@include eject(box-sizing, border-box);
textarea {
height: 100px;
}
&-item {
display: flex;
flex-direction: column;
......
......@@ -6,6 +6,7 @@ import {
View,
Text,
Input,
Textarea,
Image,
ScrollView,
Button,
......@@ -30,6 +31,7 @@ type PageState = {
clientSecret: string
equipmentUrl: string
equipmentName: string
equipmentDescribe: string
equipmentState: string
equipmentResolution: string
equipmentStyle: 'CROSSWISE' | 'LENGTHWAYS' | 'DOUBLECROSSWISE' | 'DOUBLELENGTHWAYS'
......@@ -58,6 +60,7 @@ class DeviceDetail extends Component {
clientSecret: '',
equipmentUrl: '',
equipmentName: '',
equipmentDescribe: '',
equipmentState: '',
equipmentResolution: '',
equipmentStyle: 'CROSSWISE'
......@@ -81,6 +84,7 @@ class DeviceDetail extends Component {
clientSecret,
equipmentUrl,
equipmentName,
equipmentDescribe,
equipmentState,
equipmentStyle,
equipmentResolution
......@@ -91,6 +95,7 @@ class DeviceDetail extends Component {
clientSecret,
equipmentUrl,
equipmentName,
equipmentDescribe,
equipmentState,
equipmentResolution,
equipmentStyle: !equipmentStyle ? 'CROSSWISE' : equipmentStyle
......@@ -105,6 +110,10 @@ class DeviceDetail extends Component {
const { value } = target
this.setState({ equipmentName: value })
}
setDeviceDescribe({ target }) {
const { value } = target
this.setState({ equipmentDescribe: value })
}
setResolution({ target }) {
const { value } = target
......@@ -126,6 +135,7 @@ class DeviceDetail extends Component {
equipmentUrl,
equipmentName,
equipmentStyle,
equipmentDescribe,
equipmentResolution
} = this.state
if (!equipmentName || !equipmentUrl) {
......@@ -138,6 +148,7 @@ class DeviceDetail extends Component {
equipmentId,
equipmentName,
equipmentUrl,
equipmentDescribe,
equipmentResolution,
equipmentStyle
})
......@@ -150,7 +161,13 @@ class DeviceDetail extends Component {
}
render() {
const { equipmentName, equipmentUrl, equipmentResolution, equipmentStyle } = this.state
const {
equipmentName,
equipmentUrl,
equipmentResolution,
equipmentStyle,
equipmentDescribe
} = this.state
console.log({ equipmentStyle })
return (
<ScrollView className="device-detail" scrollY>
......@@ -160,7 +177,16 @@ class DeviceDetail extends Component {
className="item-input"
value={equipmentName}
placeholder="请输入设备名称"
onInput={this.setDeviceName}
onInput={this.setDeviceDescribe}
/>
</View>
<View className="device-detail-item">
<Text className="item-text">设备描述:</Text>
<Textarea
className="item-input"
value={equipmentDescribe}
placeholder="请输入设备描述"
onInput={this.setDeviceDescribe}
/>
</View>
<View className="device-detail-item">
......
......@@ -241,7 +241,7 @@ class MyDevice extends Component {
</AtSwipeAction>
))}
</ListView>
<View className="device-list-add-btn" onClick={this.selectAddDevice}>
<View className="device-list-add-btn" onClick={this.scanCode}>
<Text className="icon">+</Text>
</View>
{/* <AtModal isOpened>
......
......@@ -22,7 +22,7 @@ interface MyFilm {
class MyFilm extends Component {
config: Config = {
navigationBarTitleText: '我的视片'
navigationBarTitleText: '我的作品'
}
render() {
......
......@@ -219,7 +219,7 @@ class Films extends Component {
</View>
<ListView
count={count}
height={height && height - 60}
height={height && height}
dataListLength={list.length}
pullingUp={done => this.onScrollToLower(done)}
pullingDown={done => this.onDownRefresh(done)}
......
@import '@styles/var.scss';
@import '~taro-ui/dist/style/components/tabs.scss';
@import '~taro-ui/dist/style/components/action-sheet.scss';
.at-tabs__item-underline {
......
......@@ -5,8 +5,6 @@ import { AtTabs, AtTabsPane } from 'taro-ui'
import Taro, { Component, Config } from '@tarojs/taro'
import './index.scss'
import 'taro-ui/dist/style/components/list.scss'
import 'taro-ui/dist/style/components/icon.scss'
import { View } from '@tarojs/components'
type PageStateProps = {}
......@@ -27,7 +25,7 @@ interface Device {
state: PageState
}
const tabList = [{ title: '我的视片' }, { title: '日程列表' }]
const tabList = [{ title: '我的作品' }, { title: '日程列表' }]
class Device extends Component {
config: Config = {
navigationBarTitleText: '',
......@@ -50,18 +48,23 @@ class Device extends Component {
const { current, windowHeight } = this.state
return (
<AtTabs current={current} tabList={tabList} onClick={this.changePage} swipeable={false}>
<AtTabsPane current={current} index={0}>
<View style={{ height: `${windowHeight + 43}px` }}>
<FilmList height={windowHeight} />
</View>
</AtTabsPane>
<AtTabsPane className="at-tabs-page" current={current} index={1}>
<View style={{ height: `${windowHeight}px` }}>
<ScheduleList height={windowHeight} />
</View>
</AtTabsPane>
</AtTabs>
<View>
<View style={{ height: `${windowHeight + 43}px` }}>
<FilmList height={windowHeight} />
</View>
</View>
// <AtTabs current={current} tabList={tabList} onClick={this.changePage} swipeable={false}>
// <AtTabsPane current={current} index={0}>
// <View style={{ height: `${windowHeight + 43}px` }}>
// <FilmList height={windowHeight} />
// </View>
// </AtTabsPane>
// <AtTabsPane className="at-tabs-page" current={current} index={1}>
// <View style={{ height: `${windowHeight}px` }}>
// <ScheduleList height={windowHeight} />
// </View>
// </AtTabsPane>
// </AtTabs>
)
}
}
......
......@@ -22,7 +22,7 @@ interface MyFilm {
class MyFilm extends Component {
config: Config = {
navigationBarTitleText: '我的视片'
navigationBarTitleText: '我的作品'
}
render() {
......
......@@ -159,7 +159,7 @@ class Films extends Component {
typeChange(state) {
const newSet = this.state.checked
if (newSet.size) {
showMyToast({ title: '不可选择不同版型的视片~' })
showMyToast({ title: '不可选择不同版型的作品~' })
return
}
Taro.setStorage({
......
......@@ -239,9 +239,9 @@ class ScheduleAdd extends Component {
value={scheduleName}
className="schedule-add-name"
/>
<View className="schedule-add-title">视片</View>
<View className="schedule-add-title">作品</View>
<Button size="mini" onClick={this.chooseFilm}>
选择视片
选择作品
</Button>
{filmList &&
filmList.map((item, index) => {
......
@import '@styles/var.scss';
@import '~taro-ui/dist/style/components/list.scss';
@import '~taro-ui/dist/style/components/icon.scss';
.films {
width: 100%;
......
......@@ -3,7 +3,7 @@ import { ComponentClass } from 'react'
import { View, Text, Icon } from '@tarojs/components'
import { showMyToast } from '@/common/utils'
import ListView from '@/conpoments/list_view'
import Taro, { Component } from '@tarojs/taro'
import Taro, { Component, Config } from '@tarojs/taro'
import { getDeviceList } from '@/actions/asyncCounter'
import FilmListItem from '@/conpoments/film_list_item'
import { AtList, AtListItem } from 'taro-ui'
......@@ -44,6 +44,9 @@ interface Schedule {
}
class Schedule extends Component {
config: Config = {
navigationBarTitleText: ''
}
protected page = 1
constructor(props) {
......
......@@ -17,7 +17,7 @@ class Index extends Component {
list: [
{
pagePath: 'pages/home/device/index',
text: '设备与视片'
text: '设备与作品'
// iconPath: './constants/images/device.png',
// selectedIconPath: './constants/images/device_ac.png'
},
......@@ -56,7 +56,7 @@ class Index extends Component {
// },
// {
// pagePath: 'pages/home/device/index',
// text: '设备与视片',
// text: '设备与作品',
// iconPath: '../../constants/images/device.png',
// selectedIconPath: '../../constants/images/device_ac.png'
// },
......
......@@ -21,7 +21,7 @@ export default function TempDetailContent(props: IProps) {
<DetailTop {...Object.assign(detailData, { templateId })} templateId2={templateId} />
<View className="temp-detail-list">
<Text className="temp-detail-list-title">我的视片({filmDataList.length})</Text>
<Text className="temp-detail-list-title">我的作品({filmDataList.length})</Text>
<View className="temp-detail-list-content">
{filmDataList && filmDataList.map(item => <TempItem {...item} key={item.templateId} />)}
</View>
......
......@@ -99,7 +99,7 @@ class TempDetail extends Component {
inputConfirm = async () => {
const { createFilmDescribe, createFilmName, templateId } = this.state
if (!createFilmName) {
showMyToast({ title: '视片名称不能为空~' })
showMyToast({ title: '作品名称不能为空~' })
return
}
try {
......@@ -176,20 +176,20 @@ class TempDetail extends Component {
)}
</View>
<Button type="primary" className="temp-detail-bottom-btn" onClick={this.createFilm}>
创建视片
创建作品
</Button>
{showModal ? (
<Modal title="视片信息" onConfirm={this.inputConfirm} onCancel={this.cancelModal}>
<Modal title="作品信息" onConfirm={this.inputConfirm} onCancel={this.cancelModal}>
<View className="film-modal">
<Text className="film-modal-text">视片名称</Text>
<Text className="film-modal-text">作品名称</Text>
<Input
placeholder="请输入视片名称"
placeholder="请输入作品名称"
className="film-modal-input"
onInput={this.changeFilmName}
/>
<Text className="film-modal-text">视片描述</Text>
<Text className="film-modal-text">作品描述</Text>
<Input
placeholder="请输入视片描述"
placeholder="请输入作品描述"
className="film-modal-input"
onInput={this.changeDescribeName}
/>
......@@ -212,7 +212,7 @@ class TempDetail extends Component {
// <View>
// <DetailTop {...detailData} />
// <View className="temp-detail-list">
// <Text className="temp-detail-list-title">我的视片({filmDataList.length})</Text>
// <Text className="temp-detail-list-title">我的作品({filmDataList.length})</Text>
// <View className="temp-detail-list-content">
// {filmDataList.map(item => (
// <TempItem {...item} key={item.templateId} />
......
......@@ -35,7 +35,7 @@ interface FilmDetail {
class FilmDetail extends Component {
config: Config = {
navigationBarTitleText: '视片详情'
navigationBarTitleText: '作品详情'
// navigationStyle: undefined
}
......@@ -123,7 +123,7 @@ class FilmDetail extends Component {
filmInfo: { templateName, templateDescribe, filmId }
} = this.state
if (!templateName) {
showMyToast({ title: '视片名称不能为空~' })
showMyToast({ title: '作品名称不能为空~' })
return
}
try {
......@@ -195,25 +195,25 @@ class FilmDetail extends Component {
</View>
<View className="film-detail-bottom-bar">
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.goEdit}>
修改视片
修改作品
</Button>
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.chengDevice}>
更改绑定设备
</Button>
</View>
{showModal ? (
<Modal title="视片信息" onConfirm={this.inputConfirm} onCancel={this.cancelModal}>
<Modal title="作品信息" onConfirm={this.inputConfirm} onCancel={this.cancelModal}>
<View className="film-modal">
<Text className="film-modal-text">视片名称</Text>
<Text className="film-modal-text">作品名称</Text>
<Input
placeholder="请输入视片名称"
placeholder="请输入作品名称"
className="film-modal-input"
value={filmInfo.templateName}
onInput={this.changeFilmName}
/>
<Text className="film-modal-text">视片描述</Text>
<Text className="film-modal-text">作品描述</Text>
<Input
placeholder="请输入视片描述"
placeholder="请输入作品描述"
className="film-modal-input"
value={filmInfo.templateDescribe}
onInput={this.changeDescribeName}
......
......@@ -32,7 +32,7 @@ interface FilmDetail {
class FilmDetail extends Component {
config: Config = {
navigationBarTitleText: '编辑视片'
navigationBarTitleText: '编辑作品'
}
constructor() {
......@@ -247,16 +247,16 @@ class FilmDetail extends Component {
<View className="film-detail">
<View className="film-detail-scroll">
{/* <View className="film-info">
<Text className="film-info-text">视片名称</Text>
<Text className="film-info-text">作品名称</Text>
<Input
placeholder="请输入视片名称"
placeholder="请输入作品名称"
className="film-info-input"
value={filmInfo.filmName}
onInput={this.changeFilmName}
/>
<Text className="film-info-text">视片描述</Text>
<Text className="film-info-text">作品描述</Text>
<Input
placeholder="请输入视片描述"
placeholder="请输入作品描述"
className="film-info-input"
value={filmInfo.filmDescribe}
onInput={this.changeDescribeName}
......@@ -290,7 +290,7 @@ class FilmDetail extends Component {
</View>
<View className="film-detail-bottom-bar">
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.goPreview}>
预览视片
预览作品
</Button>
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.updateFilm}>
更改并同步到设备
......
......@@ -71,7 +71,7 @@ class FilmDetail extends Component {
filmInfo: { templateName, templateDescribe, filmId }
} = this.state
if (!templateName) {
showMyToast({ title: '视片名称不能为空~' })
showMyToast({ title: '作品名称不能为空~' })
return
}
try {
......@@ -119,16 +119,16 @@ class FilmDetail extends Component {
return (
<View className="film-detail">
<View className="film-modal">
<Text className="film-modal-text">视片名称</Text>
<Text className="film-modal-text">作品名称</Text>
<Input
placeholder="请输入视片名称"
placeholder="请输入作品名称"
className="film-modal-input"
value={filmInfo.templateName}
onInput={this.changeFilmName}
/>
<Text className="film-modal-text">视片描述</Text>
<Text className="film-modal-text">作品描述</Text>
<Input
placeholder="请输入视片描述"
placeholder="请输入作品描述"
className="film-modal-input"
value={filmInfo.templateDescribe}
onInput={this.changeDescribeName}
......
......@@ -26,7 +26,7 @@ interface FilmPage {
class FilmPage extends Component {
config: Config = {
navigationBarTitleText: '视片详情'
navigationBarTitleText: '作品详情'
}
constructor() {
......
......@@ -279,7 +279,7 @@ class TemplateTypeDetail extends Component {
// <View>
// <DetailTop {...detailData} />
// <View className="temp-detail-list">
// <Text className="temp-detail-list-title">我的视片({filmDataList.length})</Text>
// <Text className="temp-detail-list-title">我的作品({filmDataList.length})</Text>
// <View className="temp-detail-list-content">
// {filmDataList.map(item => (
// <TempItem {...item} key={item.templateId} />
......
......@@ -96,7 +96,7 @@ class User extends Component {
className="user-item-view"
onClick={() => this.goPage('/pages/home/device/my_film/index')}
>
<Text>我的视片</Text>
<Text>我的作品</Text>
</View>
<View
className="user-item-view"
......@@ -118,7 +118,7 @@ class User extends Component {
</View>
{/* <View className="user-item">
<View className="user-item-view">
<Text>我的视片</Text>
<Text>我的作品</Text>
</View>
<View className="user-item-view">
<Text>我的设备</Text>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment