Commit 56151aa5 by Denglingling

删除多余代码,以及相关常用变量

(cherry picked from commit fbdeabf3)
parent 9f63e122
......@@ -60,26 +60,26 @@ export default class LocalVariable {
/**
* 手术模板名
*/
static SURGICAL_TEMPLATE = 'surg_temp'
static SURGICAL_TEMPLATE = 'surgical_template_name'
/**
* 钉盒名
*/
static NAIL_BOX = 'screw_box'
static NAIL_BOX = 'nail_box_name'
/**
* 器械包名
*/
static EQUIPMENT_BAG = 'equip_bag'
static EQUIPMENT_BAG = 'equipment_bag_name'
/**
* 零散器械名
*/
static SCATTERED_EQUIPMENT = 'auxili_tool'
static SCATTERED_EQUIPMENT = 'scattered_equipment_name'
/**
* 单选耗材名
*/
static SIGN_SELECT_CONSUMABLES = 'sign_consu'
static SIGN_SELECT_CONSUMABLES = 'sign_select_consumables_name'
}
\ No newline at end of file
......@@ -24,7 +24,6 @@ class LodingModel extends Component {
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
console.log('nextProps.show====', nextProps.show)
this.setState({
isVisible: nextProps.show
})
......@@ -33,14 +32,12 @@ class LodingModel extends Component {
render() {
let { title, size, color, style_back } = this.props
console.log('!!this.state.isVisible====', !!this.state.isVisible)
return (
<View style={styles.container}>
<Modal
transparent={true}
visible={!!this.state.isVisible}
animationType={'fade'}
// onRequestClose={() => this.closeModal()}>
>
<SafeAreaView style={safe_view}>
<View style={[styles.loding_cont, style_back]}>
......
import React, { Component } from 'react';
import { StyleSheet, Image, Text, TouchableOpacity, View, ScrollView } from 'react-native';
import { first_text_color, font_family_light, font_family_regular, font_family_semibold, foundation_color, home_background_color, icon_style, point_color, promary_color, pxSize, second_text_color, second_text_size, third_text_color, third_text_size, title_text_color, Width } from '../../../base/BaseStyle';
import { first_text_color, font_family_regular, font_family_semibold, home_background_color, icon_style, point_color, promary_color, pxSize, second_text_color, third_text_size, title_text_color } from '../../../base/BaseStyle';
const PropTypes = require('prop-types');
import localMockData from '../../selfOrder/module/mock/sen_mock';
import { connect } from 'react-redux';
/**
* 卡片选择器,可用于顶部,右侧
*/
class ChooseCardList extends Component {
static propTypres = {
......@@ -27,19 +29,13 @@ class ChooseCardList extends Component {
cardListOptions: PropTypes.array,
cardItemTitle: PropTypes.string,
cardItemIcon: PropTypes.string,
cardImgName: PropTypes.string,
cardCallBack: PropTypes.func,
curActIndex: PropTypes.number, // 当前已选项index
cardCountName: PropTypes.string, // 显示计数字段
cardStyleType: PropTypes.string, // 计数可选样式
cardCouStyle: PropTypes.object, // 指定计数样式
cardShowDefIcon: PropTypes.bool, // 是否显示默认无图
cardKeyName: PropTypes.string, // 关键key值
}
constructor(props) {
......@@ -51,15 +47,12 @@ class ChooseCardList extends Component {
}
render() {
let { cardScrollEnabled, cardHorizontal, cardShowsHorizontalScrollIndicator, cardShowsVerticalScrollIndicator, cardStyleBox, cardStyleScroll, cardListOptions, cardItemTitle, cardItemIcon, cardImgName,
cardStyleListItem, cardStyleListItemAct, cardStyleItemIcon, cardStyleItemTit, cardStyleNotIconTit, cardStyleItemTitAct, cardCallBack, curActIndex, cardCountName, cardStyleType, cardCouStyle,
global_domain_config, cardShowDefIcon, cardKeyName } = this.props
let { cardScrollEnabled, cardHorizontal, cardShowsHorizontalScrollIndicator, cardShowsVerticalScrollIndicator, cardStyleBox,
cardStyleScroll, cardListOptions, cardItemTitle, cardItemIcon, cardStyleListItem, cardStyleListItemAct, cardStyleItemIcon,
cardStyleItemTit, cardStyleNotIconTit, cardStyleItemTitAct, cardCallBack, curActIndex, cardCountName, cardStyleType,
cardCouStyle, global_domain_config, cardShowDefIcon } = this.props
let { countStyleType } = this.state
// let localTestImageUrls = localMockData.localTestImageUrls // 本地测试数据
// cardListOptions[cardImgName] = localTestImageUrls // 本地测试
return (
<View style={[styles.card_container, cardStyleBox]}>
<ScrollView
......@@ -72,17 +65,12 @@ class ChooseCardList extends Component {
{cardListOptions.map((item, index) => {
let cur_icon = item[cardItemIcon]
if (typeof cur_icon === 'string') {
// global_domain_config = 'https://obs-dev.gyjtsx.com' // 本地测试
// cur_icon = {uri: global_domain_config+cur_icon} // 测试
cur_icon = { uri: global_domain_config + '/jeecg-boot/sys/common/view/' + cur_icon } // 正式
cur_icon = { uri: global_domain_config + '/jeecg-boot/sys/common/view/' + cur_icon }
} else if (cur_icon instanceof Array) {
// global_domain_config = 'https://obs-dev.gyjtsx.com' // 本地测试
// cur_icon = {uri: global_domain_config+cur_icon[0]} // 测试
if (cur_icon.length === 0) {
cur_icon = require('../../../images/not_img.png')
} else {
cur_icon = { uri: global_domain_config + '/jeecg-boot/sys/common/view/' + cur_icon[0] } // 正式
cur_icon = { uri: global_domain_config + '/jeecg-boot/sys/common/view/' + cur_icon[0] }
}
}
return <View style={styles.card_list_box} key={'choose_card' + index}>
......
......@@ -37,9 +37,6 @@ class LoadingModel extends Component {
render() {
let { title, size, color, style_back } = this.props
// console.log('==aaa=LoadingModel===', this.state.isVisible)
return (
<View style={styles.container}>
<Modal
......
import React, { Component } from 'react';
import { StyleSheet, Image, TouchableOpacity, View, Modal, ActivityIndicator, Text, SafeAreaView } from 'react-native';
import { font_family_medium, font_family_regular, Height, icon_style, pxSize, second_text_color, second_text_size, Width } from '../../../base/BaseStyle';
import { AsteriskTextStyle, CellTextStyle, ContInputTextStyle, ContTextStyle, ImageTextStyle, TitleTextStyle } from '../CellTextStyle';
import { StyleSheet, Image, TouchableOpacity, View } from 'react-native';
import { font_family_regular, icon_style, pxSize, second_text_color, second_text_size } from '../../../base/BaseStyle';
import { AsteriskTextStyle, CellTextStyle, ContInputTextStyle, ContTextStyle, TitleTextStyle } from '../CellTextStyle';
const PropTypes = require('prop-types');
/**
......
import React, { Component } from 'react';
import { StyleSheet, Image, TouchableOpacity, View, Modal, ActivityIndicator, Text } from 'react-native';
import { font_family_medium, Height, icon_style, pxSize, second_text_size, Width } from '../../../base/BaseStyle';
import { font_family_medium, Height, icon_style, pxSize, second_text_size } from '../../../base/BaseStyle';
import ImageViewer from 'react-native-image-zoom-viewer';
const PropTypes = require('prop-types');
......@@ -131,7 +131,6 @@ const styles = StyleSheet.create({
marginBottom: (Height() / 2) - 40
},
top_indic: {
// backgroundColor: 'hsla(0, 0%, 100%, .2)',
position: 'absolute',
top: 50,
left: '46%'
......
......@@ -94,12 +94,9 @@ class TipInfoNeedSelect extends Component {
transparent={true}
visible={this.state.isVisible}
animationType={'fade'}
// onRequestClose={() => this.closeModal()}
>
<View style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()}
>
<TouchableOpacity style={styles.container} activeOpacity={1}>
{this.renderDialog()}
</TouchableOpacity>
</View>
......
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView
} from 'react-native';
import {
first_text_color,
third_text_size,
second_text_color,
pxSize,
foundation_color,
promary_color
} from '../../../../base/BaseStyle';
class TopTabBar extends Component {
constructor(props) {
super(props);
this.state = {
}
}
// 返回自定义 bar 元素
renderTabOption(barItem, index) {
// ScrollableTabView默认传递的属性值,即跳转方法
// console.warn('top_tab_----', this.props)
// console.warn('barItem, index----', barItem, index)
let {activeTab, tabNames, goToPage, imgTabArr, textStyle, activeTextColor} = this.props
console.warn(activeTab, index, 'hh')
return (
<TouchableOpacity
activeOpacity={.8}
key={barItem}
onPress={() => goToPage(index)}
style={[styles.bar_box, activeTab == index ? styles.bar_box_act : '']}
>
<View style={styles.img_box}>
<Image source={imgTabArr[index]} style={styles.img_inner}/>
</View>
<Text style={[textStyle, activeTab == index ? activeTextColor : '']}>{barItem}</Text>
</TouchableOpacity>
)
}
render() {
let {style, tabs} = this.props
console.warn('hhhhh', tabs)
console.warn(this.props)
return (
<View style={[styles.bar_cont, style]}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
this.props.tabs.map((tab, index) => this.renderTabOption(tab, index))
}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
bar_cont: {
backgroundColor: foundation_color,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1,
flexDirection: 'row',
height: 76,
paddingHorizontal: 20
},
top_scroll_cont: {
},
tab: {
},
bar_box: {
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
// paddingBottom: 10,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
width: 58,
marginRight: 8
},
bar_box_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
img_box: {
width: pxSize(30),
height: pxSize(30)
},
img_inner: {
width: '100%',
height: '100%'
},
tit_text: {
paddingTop: 10,
paddingBottom: 16,
color: second_text_color,
fontSize: third_text_size
},
tit_text_act: {
color: first_text_color,
fontWeight: 'bold'
}
})
export default TopTabBar;
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView
} from 'react-native';
import {
first_text_color,
third_text_size,
second_text_color,
pxSize,
foundation_color,
promary_color
} from '../../../../base/BaseStyle';
class TopTabBar extends Component {
constructor(props) {
super(props);
this.state = {
}
}
// 返回自定义 bar 元素
renderTabOption(barItem, index) {
// ScrollableTabView默认传递的属性值,即跳转方法
// console.warn('top_tab_----', this.props)
// console.warn('barItem, index----', barItem, index)
let {activeTab, tabNames, goToPage, imgTabArr, textStyle, activeTextColor} = this.props
// console.warn(activeTab, index, 'hh')
return (
<TouchableOpacity
activeOpacity={.8}
key={barItem}
onPress={() => goToPage(index)}
style={[styles.bar_box, activeTab == index ? styles.bar_box_act : '']}
>
<View style={styles.img_box}>
<Image source={imgTabArr[index]} style={styles.img_inner}/>
</View>
<Text style={[textStyle, activeTab == index ? activeTextColor : '']}>{barItem}</Text>
</TouchableOpacity>
)
}
render() {
let {style, tabs} = this.props
// console.warn('hhhhh', tabs)
// console.warn(this.props)
return (
<View style={[styles.bar_cont, style]}>
<ScrollView
style={styles.top_scroll_cont}
horizontal={true}
showsHorizontalScrollIndicator={false}
>
{
this.props.tabs.map((tab, index) => this.renderTabOption(tab, index))
}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
bar_cont: {
backgroundColor: foundation_color,
borderBottomColor: '#F4F4F4',
borderBottomWidth: 1,
flexDirection: 'row',
height: 76,
paddingHorizontal: 20
},
top_scroll_cont: {
},
tab: {
},
bar_box: {
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
// paddingBottom: 10,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
width: 58,
marginRight: 8
},
bar_box_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
img_box: {
width: pxSize(30),
height: pxSize(30)
},
img_inner: {
width: '100%',
height: '100%'
},
tit_text: {
paddingTop: 10,
paddingBottom: 16,
color: second_text_color,
fontSize: third_text_size
},
tit_text_act: {
color: first_text_color,
fontWeight: 'bold'
}
})
export default TopTabBar;
\ No newline at end of file
/**
* 本地接口测试数据
*/
const local_photos = ['files/20200731/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20200731113857_1596166761793_1596184849964.jpg',
'files/20200921/5_1599645385381_1600672374371.jpg',
'files/20200921/4_1599645381425_1600672375091.jpg',
......
export default [
{
isRequest: true,
title: '销售员',
value: '易凯源',
isPicker: false,
isEditText: true
},
{
isRequest: true,
title: '组织',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '客户名称',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '收单地点',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '收货地点',
value: '请选择',
isPicker: true
},
{
isRequest: false,
title: '主治医生',
value: '请选择',
isPicker: true,
showInput: true
},
{
isRequest: false,
title: '手术名称',
value: '请输入',
isPicker: false
},
{
isRequest: false,
title: '手术时间',
value: '请选择',
isPicker: true,
showDatePicker: true
},
{
isRequest: true,
title: '手术类型',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '订单类型',
value: '请选择',
isPicker: true
},
{
isRequest: true,
title: '选择产品',
value: '请选择',
isPicker: true,
showItemPage: true
}
]
\ No newline at end of file
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