fix:仪器管理、仪器介绍样式修复

master
blak-kong 2 years ago
parent fdf863b105
commit 6f952823a4

@ -1,109 +1,122 @@
.footer {
position: fixed;
bottom: 0;
background: #fff;
flex-direction: column;
width: 100%;
padding-bottom: 30rpx;
// padding-bottom: env(safe-area-inset-bottom);
}
.intro {
.intro-main {
position: relative;
overflow: hidden;
}
.footer {
position: fixed;
bottom: 0;
background: #fff;
flex-direction: column;
width: 100%;
padding-bottom: 30rpx;
// padding-bottom: env(safe-area-inset-bottom);
}
.footer .btn {
width: 690rpx;
height: 90rpx;
background: #000;
border-radius: 45rpx;
text-align: center;
line-height: 90rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
}
.footer .btn {
width: 690rpx;
height: 90rpx;
background: #000;
border-radius: 45rpx;
text-align: center;
line-height: 90rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
}
.footer .text {
background: transparent;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
.footer .text {
background: transparent;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
.main {
height: 100vh;
text-align: center;
margin-top: 34rpx;
padding-bottom: calc(env(safe-area-inset-bottom) + 180rpx);
}
.main {
height: 100vh;
text-align: center;
margin-top: 34rpx;
// padding-bottom: calc(env(safe-area-inset-bottom) + 180rpx);
}
.cover {
display: block; // 消除默认间距
width: 660rpx;
height: 922rpx;
border-radius: 50rpx;
}
.cover {
display: block; // 消除默认间距
width: 660rpx;
height: 922rpx;
border-radius: 50rpx;
margin: 0 auto;
}
.content {
display: block; // 消除默认间距
width: 660rpx;
// height: 474rpx;
height: 488rpx;
background: linear-gradient(rgba(204, 204, 204, 0.4), #fff);
border-radius: 50rpx;
margin-top: 7rpx;
}
.content {
display: block; // 消除默认间距
width: 660rpx;
// height: 474rpx;
height: 488rpx;
background: linear-gradient(rgba(204, 204, 204, 0.4), #fff);
border-radius: 50rpx;
margin: 0 auto;
margin-top: 7rpx;
}
.title {
font-size: 48rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000;
text-align: center;
padding-bottom: 30rpx;
padding-top: 84rpx;
}
.title {
font-size: 48rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000;
text-align: center;
padding-bottom: 30rpx;
padding-top: 84rpx;
}
.text {
font-size: 26rpx;
font-weight: 500;
color: #666;
}
.text {
font-size: 26rpx;
font-weight: 500;
color: #666;
}
// .indicator {
// position: absolute;
// left: 50%;
// top: 960rpx;
// transform: translate(-50%, -50%);
// width: 120rpx;
// height: 1rpx;
// background: #ccc;
// }
// .indicator {
// position: absolute;
// left: 50%;
// top: 960rpx;
// transform: translate(-50%, -50%);
// width: 120rpx;
// height: 1rpx;
// background: #ccc;
// }
// .dot {
// height: 100%;
// background: #000;
// transition-property: all;
// transition-duration: 0.8s;
// }
.indicator {
position: absolute;
left: 50%;
top: 960rpx;
transform: translate(-50%, -50%);
display: inline-flex;
width: 360rpx;
height: 1px;
background: transparent;
.dot {
// .dot {
// height: 100%;
// background: #000;
// transition-property: all;
// transition-duration: 0.8s;
// }
.indicator {
position: absolute;
left: 50%;
// top: 960rpx;
top: 990rpx;
transform: translate(-50%, -50%);
display: inline-flex;
flex: 1;
height: 100%;
background: #f2f2f2;
transition-duration: 0.5s;
margin-right: 4rpx;
transition: all 0.6s ease-in-out 0.1s;
}
.bg-show {
background: #000;
width: 360rpx;
height: 1px;
background: transparent;
.dot {
display: inline-flex;
flex: 1;
height: 100%;
background: #f2f2f2;
transition-duration: 0.5s;
margin-right: 4rpx;
transition: all 0.6s ease-in-out 0.1s;
}
.only-dot {
width: 120rpx;
margin: 0 auto;
}
.bg-show {
background: #000;
}
}
}

@ -37,6 +37,7 @@ class Intro extends Component<any, any> {
super(props);
this.state = {
name: "仪器介绍页",
navHeight: 0,
current: 0,
instrument: {},
introList: [],
@ -61,7 +62,9 @@ class Intro extends Component<any, any> {
}
$instance = Taro.getCurrentInstance();
async onLoad() {}
async onLoad() {
this.setStatusBar();
}
componentDidMount() {
let strObj = getStorageSync("instrument_detail");
if (strObj) {
@ -82,13 +85,32 @@ class Intro extends Component<any, any> {
componentDidHide() {}
setStatusBar() {
Taro.getSystemInfoAsync({
success: (res) => {
const statusBarHeight = res.statusBarHeight || 0;
// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
const custom = Taro.getMenuButtonBoundingClientRect();
// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
const navigationBarHeight =
custom.height + (custom.top - statusBarHeight) * 2;
// 总体高度 = 状态栏高度 + 导航栏高度
const navHeight = (navigationBarHeight + statusBarHeight) * 2;
this.setState({
navHeight,
});
},
});
}
async initData() {}
onChange(event) {
onChange = (event) => {
console.info("onchange", event);
// const current = event.detail.current;
// this.setState({ current });
}
const current = event.detail.current;
this.setState({ current });
};
// 获取设备信息
getInstrumentInfo = async (id) => {
@ -329,6 +351,7 @@ class Intro extends Component<any, any> {
isShowVersionUpgrading,
isShowVersionUpgradFinish,
versionUpgradFinishNodes,
navHeight,
} = this.state;
return (
<Block>
@ -425,62 +448,81 @@ class Intro extends Component<any, any> {
/>
{/* IOT相关弹窗 END */}
</View>
<View style="position: relative">
<Swiper
className="main"
current={current}
onChange={this.onChange}
duration={800}
indicatorDots={false}
indicatorColor="#999"
indicatorActiveColor="#333"
previousMargin="32rpx"
nextMargin="32rpx"
<View className="intro">
<View
className="intro-main"
style={{ height: "calc(100vh - " + navHeight + "rpx)" }}
>
{introList.map((item: any, index: number) => {
return (
<SwiperItem key={index}>
{item.fileType === "video" ? (
<Video className="cover" src={item.file} />
) : (
<Image
className="cover"
src={item.file}
mode="aspectFill"
></Image>
)}
<View className="content">
<View className="title">{instrument.name}</View>
<View className="text">{item.message}</View>
</View>
</SwiperItem>
);
})}
</Swiper>
{introList.length && (
<View className="indicator">
{introList.map((_item, index) => {
<Swiper
className="main"
current={current}
onChange={this.onChange}
duration={800}
indicatorDots={false}
indicatorColor="#999"
indicatorActiveColor="#333"
previousMargin={introList.length > 1 ? "32rpx" : "0px"}
nextMargin={introList.length > 1 ? "32rpx" : "0px"}
>
{introList.map((item: any, index: number) => {
return (
<View
key={"indicator_" + index}
className={classnames("dot", {
"bg-show": current === index,
})}
/>
<SwiperItem key={index}>
{item.fileType === "video" ? (
<Video className="cover" src={item.file} />
) : (
<Image
className="cover"
src={item.file}
mode="aspectFill"
></Image>
)}
<View className="content">
<View className="title">{instrument.name}</View>
<View className="text">{item.message}</View>
</View>
</SwiperItem>
);
})}
</View>
)}
</View>
<View className="footer flex aitems jcenter">
<View className="btn" onClick={this.goNursing}>
</Swiper>
{introList.length > 1 && (
<View className="indicator">
{introList.map((_item, index) => {
return (
<View
key={"indicator_" + index}
className={classnames("dot", {
"bg-show": current === index,
})}
/>
);
})}
</View>
)}
{introList.length === 1 && (
<View className="indicator">
{introList.map((_item, index) => {
return (
<View
key={"indicator_" + index}
className={classnames("only-dot", {
"bg-show": current === index,
})}
/>
);
})}
</View>
)}
</View>
<View className="btn text" onClick={this.toHomePage}>
<View className="footer flex aitems jcenter">
<View className="btn" onClick={this.goNursing}>
</View>
<View className="btn text" onClick={this.toHomePage}>
</View>
</View>
</View>
</Block>

@ -15,6 +15,7 @@ page {
.un_bind_list {
width: 100%;
white-space: nowrap;
box-sizing: border-box;
// margin-left: 37rpx;
}
@ -24,6 +25,7 @@ page {
.bind_list {
height: 650rpx;
.wrapper {
display: inline-block;
position: relative;
@ -83,13 +85,16 @@ page {
}
}
}
.backColer{
.backColer {
background: linear-gradient(to bottom, #e3e3e3, #f8f8f8);
height: 211rpx;
padding: 0rpx 0rpx;
border-radius: 50px;
box-sizing: border-box;
}
.bind_cont {
box-sizing: border-box;
overflow: hidden;
.title {
text-align: center;
font-size: 36rpx;

@ -231,13 +231,17 @@ class IotCarePlanFR200 extends Component<any, any> {
/** FR200模式类型名称 */
ModeTypeArray: string[] = [
"all",
"Base",
"Zone",
"Permeation",
"Sensitive",
"Intelligence",
"base",
"eyes",
"zone",
"permeation",
"sensitive",
"intelligence",
];
/** 基础版:脸部/眼部 */
BaseModeType: string[] = ["face", "eyes"];
async onLoad() {
// 保持屏幕常亮
Taro.setKeepScreenOn({
@ -493,7 +497,7 @@ class IotCarePlanFR200 extends Component<any, any> {
return false;
}
if (this.isRuning === true && this.state.DeviceConnectStatus == 1) {
if (this.isRuning && this.state.DeviceConnectStatus == 1) {
// 提示切换护理模式
if (this.isCheckNurseTime()) {
// 满足时间条件,提示是否保存部分护理记录
@ -753,13 +757,15 @@ class IotCarePlanFR200 extends Component<any, any> {
this.state.DeviceConnectStatus === 1 &&
jsonStatus.workStatus !== MODE_WORKING_ENUM.END
) {
this.updateDeviceSyncData(
{
totalWorkingMinutes: jsonStatus.totalWorkingMinutes,
totalWorkingSeconds: jsonStatus.totalWorkingSeconds,
},
jsonStatus
);
// 水分测试手动检测时间,不自动计算倒计时
if (jsonStatus?.workMode !== "moistureTest")
this.updateDeviceSyncData(
{
totalWorkingMinutes: jsonStatus.totalWorkingMinutes,
totalWorkingSeconds: jsonStatus.totalWorkingSeconds,
},
jsonStatus
);
}
}
}
@ -800,7 +806,7 @@ class IotCarePlanFR200 extends Component<any, any> {
// 仅当设备模式与小程序是否一致,才允许更改设备运行时间
if (
this.state.DeviceConnectStatus === 1 &&
this.isRuning == 2 &&
this.isRuning &&
jsonStatus.workStatus !== MODE_WORKING_ENUM.END
) {
this.updateDeviceSyncData(
@ -927,7 +933,7 @@ class IotCarePlanFR200 extends Component<any, any> {
if (
sceneTime > totalTime &&
this.isRuning === true &&
this.isRuning &&
this.state.DeviceConnectStatus == 1
) {
// 界面倒计时同步设备时间
@ -972,7 +978,7 @@ class IotCarePlanFR200 extends Component<any, any> {
* params
*/
judgementWorkStatus(nWorkStatus, nWorkMode) {
const { workMode, ActiveModeItem, ModeList } = this.state;
const { ActiveModeItem, ModeList } = this.state;
const opts: any = {};
// ActiveModeItem
let nowModeItem;
@ -999,25 +1005,18 @@ class IotCarePlanFR200 extends Component<any, any> {
this.setState({
isShowCountdown: false,
});
if (nowModeItem?.isCabinMode && this.isRuning === true) {
opts.currentTime = nowCurrentTime;
} else if (!nowModeItem?.isCabinMode && this.isRuning === true) {
// fix: 启动非支架模式倒计时时连上支架仪器的状态变为standby
this.isRuning === false;
}
},
setting: () => {
// that.data.hadShowBreakTips = false;
this.setState({
hadShowBreakTips: false,
});
if (this.isRuning === false && !ActiveModeItem.isCabinMode) {
if (!this.isRuning && !ActiveModeItem.isCabinMode) {
this.isRuning = true;
this.setState({
title: "正在护理",
isStopNurse: false,
});
} else if (this.isRuning === false && ActiveModeItem.isCabinMode) {
} else if (!this.isRuning && ActiveModeItem.isCabinMode) {
this.isRuning = true;
// this.setState({
// title: "正在护理",
@ -1196,11 +1195,20 @@ class IotCarePlanFR200 extends Component<any, any> {
}
}
const sendParams = {
let sendParams: any = {
...deviceCommandSamples.pause,
workMode: ActiveModeItem.modeType, // 使用模式
workStatus: newWorkStatus,
};
// 水分测试需要特殊处理
if (ActiveModeItem.modeType === "moistureTest") {
sendParams.testStatus = "standby"; // 切换为准备
if (isBtnClick) {
sendParams.testStatus = "start"; // 点击开始再开始
}
}
console.log("准备发送自定义或工作指令", ActiveModeItem, sendParams);
const pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
sendParams as any

@ -57,7 +57,7 @@ function Index({
</View>
)}
{BaseList.length > 0 &&
(ModeType === "all" || ModeType === "Base" || isPop) && (
(ModeType === "all" || ModeType === "base" || isPop) && (
<ScrollView
className="mode-list-box"
scroll-x="true"
@ -68,8 +68,8 @@ function Index({
{BaseList.map((item: any, index: any) => {
return (
<View
key={"Base_" + index}
id={"Base_" + item.id}
key={"base_" + index}
id={"base_" + item.id}
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,
})}
@ -115,7 +115,7 @@ function Index({
</ScrollView>
)}
{ZoneList.length > 0 &&
(ModeType === "all" || ModeType === "Zone" || isPop) && (
(ModeType === "all" || ModeType === "zone" || isPop) && (
<ScrollView
className="mode-list-box"
scrollX={true}
@ -126,8 +126,8 @@ function Index({
{ZoneList.map((item: any, index: any) => {
return (
<View
key={"Zone_" + index}
id={"Zone_" + item.id}
key={"zone_" + index}
id={"zone_" + item.id}
onClick={onItemClick.bind(this, item)}
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,
@ -173,7 +173,7 @@ function Index({
)}
{PermeationList.length > 0 &&
(ModeType === "all" || ModeType === "Permeation" || isPop) && (
(ModeType === "all" || ModeType === "permeation" || isPop) && (
<ScrollView
className="mode-list-box"
scrollX={true}
@ -184,8 +184,8 @@ function Index({
{PermeationList.map((item: any, index: any) => {
return (
<View
key={"Permeation_" + index}
id={"Permeation_" + item.id}
key={"permeation_" + index}
id={"permeation_" + item.id}
onClick={onItemClick.bind(this, item)}
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,
@ -231,7 +231,7 @@ function Index({
)}
{SensitiveList.length > 0 &&
(ModeType === "all" || ModeType === "Sensitive" || isPop) && (
(ModeType === "all" || ModeType === "sensitive" || isPop) && (
<ScrollView
className="mode-list-box"
scrollX={true}
@ -242,8 +242,8 @@ function Index({
{PermeationList.map((item: any, index: any) => {
return (
<View
key={"Sensitive_" + index}
id={"Sensitive_" + item.id}
key={"sensitive_" + index}
id={"sensitive_" + item.id}
onClick={onItemClick.bind(this, item)}
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,
@ -289,7 +289,7 @@ function Index({
)}
{IntelligenceList.length > 0 &&
(ModeType === "all" || ModeType === "Intelligence" || isPop) && (
(ModeType === "all" || ModeType === "intelligence" || isPop) && (
<ScrollView
className="mode-list-box"
scrollX={true}
@ -300,8 +300,8 @@ function Index({
{IntelligenceList.map((item: any, index: any) => {
return (
<View
key={"Intelligence_" + index}
id={"Intelligence_" + item.id}
key={"intelligence_" + index}
id={"intelligence_" + item.id}
onClick={onItemClick.bind(this, item)}
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,

@ -271,7 +271,7 @@ class User extends Component<any, any> {
<View
style="margin-top:0"
className="block"
data-url="/pages/instrument_manage/index?isback=1"
data-url="/instrument/pages/instrument_manage/index?isback=1"
onClick={this.goUrlNoRegister}
>
<Image
@ -312,49 +312,7 @@ class User extends Component<any, any> {
<View className="txt"></View>
</View>
</View>
{/* <View className="info2 flex aitems sa">
<View
className="block"
data-url="/pages/instrument_manage/index?isback=1"
onClick={this.goUrlNoRegister}
>
<Image
className="bg_img"
src={require("../../img/device_bg.png")}
mode="aspectFill"
></Image>
<View className="tip flex aitems">
<View className="tip1"></View>
<View className="right">
<Image src="/img/my_right.png" mode="aspectFill" />
</View>
</View>
<View className="num">{userInfo.devicesNum}</View>
<View className="txt"></View>
</View>
<View
className="block"
onClick={this.goUrlNoRegister}
data-url="/pages/integral_list/integral_list"
>
<Image
className="bg_img"
src={require("../../img/point_bg.png")}
mode="aspectFill"
></Image>
<View className="tip flex aitems">
<View className="tip1"></View>
<View className="right">
<Image
src={require("../../img/my_right.png")}
mode="aspectFill"
/>
</View>
</View>
<View className="num">{userInfo.credit}</View>
<View className="txt"></View>
</View>
</View> */}
<View className="info3">
{lastDay} : {userInfo.expireCredit}
</View>

@ -32,7 +32,7 @@ export default class Recording extends Component<any, any> {
this.state = {
name: "护理历程",
current: 0,
ViewAddInstrument: false, //用来记录有没有添加设备
ViewAddInstrument: false, //用来记录有没有添加设备
array: [1, 2, 3, 4, 5],
recordList: [],
bindingInstrumentList: [],
@ -64,9 +64,9 @@ export default class Recording extends Component<any, any> {
};
}
componentDidMount() { }
componentDidMount() {}
componentWillUnmount() { }
componentWillUnmount() {}
// 格式化时间
getTime(time) {
const hour = time.slice(0, 2);
@ -88,20 +88,17 @@ export default class Recording extends Component<any, any> {
}
// 获取护理历程
async getRecord(id) {
let data = {};
if (id != null) {
data["instrumentId"] = id;
}
let res = await InstrumentInfo.apiNursingLog.getRecord(data);
console.log(res, '查看你获取护理历程');
console.log(res, "查看你获取护理历程");
if (res.data.code === 200) {
res.data.rows.map((item) => {
item.nursingTime = this.getTime(item.nursingTime);
let createTime = getdates(item.createTime)
let createTime = getdates(item.createTime);
item.createTime = createTime && createTime.replace(/-/g, ".");
});
@ -144,7 +141,6 @@ export default class Recording extends Component<any, any> {
let res = await InstrumentInfo.apiClock.getClockStatistics({ year });
if (res.data.code === 200) {
res.data.data.reverse();
if (res.data.data.length > 0) {
res.data.data.map((item, index) => {
@ -184,7 +180,9 @@ export default class Recording extends Component<any, any> {
// 文本框输入文字
handleTextareaInput = (e) => {
const punchInInfo = this.state.punchInInfo;
this.setState({ punchInInfo: { ...punchInInfo, clockContent: e.detail.value } });
this.setState({
punchInInfo: { ...punchInInfo, clockContent: e.detail.value },
});
};
// 打开/关闭弹窗
setShow(show: boolean) {
@ -194,7 +192,7 @@ export default class Recording extends Component<any, any> {
onChangeProduct(id) {
this.setState({ curIndex: id });
this.getRecord(id);
this.addLog();
// this.addLog();
}
// 展开收起
onChangeMore(id, year, month) {
@ -223,8 +221,7 @@ export default class Recording extends Component<any, any> {
if (item.id === id) {
item.detail = res.data.data;
item.detail.map((obj) => {
let updateTime = getdates(obj.updateTime)
let updateTime = getdates(obj.updateTime);
obj.updateTime = updateTime && updateTime.replace(/-/g, ".");
});
@ -234,51 +231,47 @@ export default class Recording extends Component<any, any> {
}
}
async DayTime() {
let storedData = Taro.getStorageSync('DayTime')
let storedData = Taro.getStorageSync("DayTime");
const day = new Date();
if (storedData === undefined || storedData === "") {
this.setState({
clockShow: false
})
clockShow: false,
});
} else {
const storedDate = new Date(storedData);
const currentDate = new Date(day.toISOString());
const isSameDate = storedDate.toDateString() === currentDate.toDateString();
const isSameDate =
storedDate.toDateString() === currentDate.toDateString();
if (isSameDate) {
this.setState({
clockShow: true
})
clockShow: true,
});
} else {
this.setState({
clockShow: false
})
clockShow: false,
});
}
}
}
async onLoad(options) {
const ViewAddInstrument = options.param;
this.setState({
ViewAddInstrument: ViewAddInstrument
})
ViewAddInstrument: ViewAddInstrument,
});
this.getRecord(null);
this.getBindingInstrumentList();
this.getLatestClockRecord();
this.getClockStatistics();
this.DayTime()
this.DayTime();
}
componentDidShow() { }
componentDidShow() {}
componentDidHide() { }
componentDidHide() {}
async initData() { }
async initData() {}
// 选择年份
onChangeYear(event) {
this.setState({ year: event.detail.value });
@ -294,18 +287,18 @@ export default class Recording extends Component<any, any> {
};
// 跳转到护理报告
toReport(id, recordId, item) {
console.log(item, '查看类型', item.jumpType);
item.jumpType = 1
console.log(item, "查看类型", item.jumpType);
item.jumpType = 1;
switch (item.jumpType) {
case 1:
this.One(item);
break;
case 2:
this.two(item); break;
this.two(item);
break;
case 3:
this.three(item); break;
this.three(item);
break;
default:
this.AllDevice(item);
}
@ -314,26 +307,30 @@ export default class Recording extends Component<any, any> {
}
// 打开第一种类型
One = async (item) => {
console.log('打开第一种类型', item);
let report = false
go("/recoding/pages/face_report_one/face_report_one?id=" + item.id + "&recordId=" + item.recordId + "&report=" + report);
}
console.log("打开第一种类型", item);
let report = false;
go(
"/recoding/pages/face_report_one/face_report_one?id=" +
item.id +
"&recordId=" +
item.recordId +
"&report=" +
report
);
};
// 打开第二种类型
two = async (item) => {
console.log('打开第二种类型', item);
}
console.log("打开第二种类型", item);
};
// 打开第二种类型
three = async (item) => {
console.log('打开第二种类型', item);
}
console.log("打开第二种类型", item);
};
// 打开其他类型
AllDevice = async (item) => {
console.log('打开其他类型', item);
console.log("打开其他类型", item);
go("/pages/face_report_AllDevice/face_report_AllDevice");
}
};
// 上传图片
handleChooseImage() {
Taro.chooseMedia({
@ -390,14 +387,13 @@ export default class Recording extends Component<any, any> {
t2: "您已完成今日打卡",
btn1show: false,
}).then(() => {
let data = new Date
Taro.setStorageSync('DayTime', data.toISOString())
let data = new Date();
Taro.setStorageSync("DayTime", data.toISOString());
this.setState({
clockShow: true
})
clockShow: true,
});
this.getClockStatistics();
this.setShow(false);
});
});
}
@ -427,8 +423,8 @@ export default class Recording extends Component<any, any> {
return (
<Block>
<Navbar isBack titleSlot='护理记录'></Navbar>
<View className='tabs'>
<Navbar isBack titleSlot="护理记录"></Navbar>
<View className="tabs">
<View
className={classnames("tab", {
tab_active: current === 0,
@ -449,7 +445,7 @@ export default class Recording extends Component<any, any> {
</View>
</View>
{current === 0 && (
<ScrollView className='products_list' scroll-x='true'>
<ScrollView className="products_list" scroll-x="true">
<View
className={classnames("all", {
products_item_active: !curIndex,
@ -467,11 +463,11 @@ export default class Recording extends Component<any, any> {
onClick={this.onChangeProduct.bind(this, item.id)}
>
<Image
className='products_cover'
className="products_cover"
src={require("@/img/test/1706692819894.jpg")}
mode='aspectFit'
mode="aspectFit"
></Image>
<View className='products_title'></View>
<View className="products_title"></View>
</View>
))}
</ScrollView>
@ -479,17 +475,17 @@ export default class Recording extends Component<any, any> {
{current === 0 && recordList.length === 0 && (
<View>
<View className='nodata'>
<View className="nodata">
<Image
className='nodata_img'
className="nodata_img"
src={require("@/img/nodata.png")}
></Image>
<View className='nodata_text'></View>
<View className="nodata_text"></View>
</View>
</View>
)}
{current === 0 && (
<View style='padding-bottom:200px'>
<View style="padding-bottom:200px">
{/* <View className='instrument_item' >
<View className='instrument_top flex sb aitems'>
<View className='time_box flex aitems'>
@ -516,12 +512,12 @@ export default class Recording extends Component<any, any> {
</View>
</View> */}
<View className='instrument_list '>
<View className="instrument_list ">
{recordList.map((item: any, index: any) => (
<View className='recording-box' key={item.id}>
<View className='box-top'>
<View className='top-left'>
<View className='date'>{item.createTime}</View>
<View className="recording-box" key={item.id}>
<View className="box-top">
<View className="top-left">
<View className="date">{item.createTime}</View>
<View
className={classnames("tip", {
tag_active: item.online === 2,
@ -532,33 +528,33 @@ export default class Recording extends Component<any, any> {
</View>
{item.instrumentType === 2 && (
<View
className='top-right'
className="top-right"
onClick={this.toReport.bind(
this,
item.instrumentId,
item.id,
item,
item
)}
>
<Image
className='arrow_icon'
className="arrow_icon"
src={require("@/img/index/right.png")}
mode='aspectFill'
mode="aspectFill"
></Image>
</View>
)}
</View>
<View className='box-bottom'>
<View className="box-bottom">
<Image
className='recording_img'
className="recording_img"
src={item.modeImage}
></Image>
<View className='bottom-right'>
<View className='title'>{item.instrumentName}</View>
<View className='subtitle-box'>
<View className='subtitle'>{item.modeName}</View>
<View className='subtitle'>
<View className="bottom-right">
<View className="title">{item.instrumentName}</View>
<View className="subtitle-box">
<View className="subtitle">{item.modeName}</View>
<View className="subtitle">
{item.nursingTime}
</View>
</View>
@ -570,7 +566,7 @@ export default class Recording extends Component<any, any> {
</View>
)}
{current === 1 && (
<View style='padding-bottom:200px'>
<View style="padding-bottom:200px">
{/* <View className='nodata'>
<Image
className='nodata_img'
@ -578,52 +574,52 @@ export default class Recording extends Component<any, any> {
></Image>
<View className='nodata_text'></View>
</View> */}
<View style='height: 30rpx; background: #F8F8F8'></View>
<View className='clock_in_statistics m-x-30 flex sb'>
<View className='flex sb ab'>
<View className='clock_in_statistics_title'></View>
<View style="height: 30rpx; background: #F8F8F8"></View>
<View className="clock_in_statistics m-x-30 flex sb">
<View className="flex sb ab">
<View className="clock_in_statistics_title"></View>
<Picker
mode='date'
fields='year'
mode="date"
fields="year"
onChange={this.onChangeYear.bind(this)}
value='{{year}}'
end='{{today}}'
value="{{year}}"
end="{{today}}"
>
<View className='clock_in_statistics_date flex aitems'>
<View className="clock_in_statistics_date flex aitems">
<View>{year}</View>
<Image
className='more_icon'
className="more_icon"
src={require("@/img/arrow-down.png")}
mode='widthFix'
mode="widthFix"
></Image>
</View>
</Picker>
</View>
<View className='chart flex sb'>
<View className="chart flex sb">
{monthTime.map((item) => (
<View className='flex fc aitems' key={item.month}>
<View className="flex fc aitems" key={item.month}>
{item.time > 0 && (
<View className='buoy'>{item.time}</View>
<View className="buoy">{item.time}</View>
)}
<View
className='column'
className="column"
style={{ height: `calc(186/31*${item.time}rpx)` }}
></View>
<View className='month'>{item.month}</View>
<View className="month">{item.month}</View>
</View>
))}
</View>
</View>
<View style='padding-bottom: env(safe-area-inset-bottom)'>
<View className='month_box m-x-30'>
<View style="padding-bottom: env(safe-area-inset-bottom)">
<View className="month_box m-x-30">
{clockStatistics.map((item) => (
<View className='month_statistics' key={item.id}>
<View className='flex aitems sb'>
<View className='time'>
<View className="month_statistics" key={item.id}>
<View className="flex aitems sb">
<View className="time">
{item.year}{item.month}
</View>
<View
className='more_box flex aitems'
className="more_box flex aitems"
onClick={this.onChangeMore.bind(
this,
item.id,
@ -631,7 +627,7 @@ export default class Recording extends Component<any, any> {
item.month
)}
>
<View className='more_text'>
<View className="more_text">
{" "}
{!item.isMore ? "展开更多" : "收起更多"}
</View>
@ -641,49 +637,51 @@ export default class Recording extends Component<any, any> {
? "rotate(180deg)"
: "rotate(0deg)",
}}
className='more_icon'
className="more_icon"
src={require("@/img/arrow-down.png")}
mode='widthFix'
mode="widthFix"
></Image>
</View>
</View>
<View style='height: 59rpx'></View>
<View className='statistic'>
<View className='statistic_item'>
<View className='statistic_num'>{item.clockNum}</View>
<View className='statistic_desc'></View>
<View style="height: 59rpx"></View>
<View className="statistic">
<View className="statistic_item">
<View className="statistic_num">{item.clockNum}</View>
<View className="statistic_desc"></View>
</View>
<View className='statistic_item'>
<View className='statistic_num'>
<View className="statistic_item">
<View className="statistic_num">
{(item.percentage * 100).toFixed(2)}%
</View>
<View className='statistic_desc'></View>
<View className="statistic_desc"></View>
</View>
<View className='border'></View>
<View className="border"></View>
</View>
{item.isMore && item.detail && (
<View>
{item.detail.map((obj) => (
<View key={obj}>
<View style='height: 57rpx'></View>
<View className='month_item'>
<View className='month_item_date'>
<View style="height: 57rpx"></View>
<View className="month_item">
<View className="month_item_date">
{obj.updateTime}
</View>
<View className='month_image_box flex sb'>
<View className="month_image_box flex sb">
{obj.clockImg.map((img) => (
<Image
key={img}
className='month_item_cover'
className="month_item_cover"
src={img}
></Image>
))}
</View>
<View className='month_item_date'>
<View className="month_item_date">
{/* 小紫弹智能射频仪、花至抗老射频仪PRO{" "} */}
{obj.instrumentName === null ? "" : obj.instrumentName}
{obj.instrumentName === null
? ""
: obj.instrumentName}
</View>
<View className='month_item_note'>
<View className="month_item_note">
{obj.clockContent}
</View>
</View>
@ -697,79 +695,76 @@ export default class Recording extends Component<any, any> {
</View>
</View>
)}
{
!clockShow && ViewAddInstrument === "true" && (
<View className='footer flex aitems'>
<View className='btn' onClick={this.setShow.bind(this, true)}>
</View>
{/* <View className="text" onClick={this.back}>
{!clockShow && ViewAddInstrument === "true" && (
<View className="footer flex aitems">
<View className="btn" onClick={this.setShow.bind(this, true)}>
</View>
{/* <View className="text" onClick={this.back}>
&gt;
</View> */}
</View>
)
}
</View>
)}
<Popup show={show} onClose={() => this.setState({ show: false })}>
<View className='popBox'>
<View className="popBox">
<Image
className='close_icon'
className="close_icon"
src={require("@/img/close.png")}
mode='widthFix'
mode="widthFix"
onClick={this.setShow.bind(this, false)}
></Image>
<View className='popTitle'></View>
<View className='popSubtitle'>
<View className="popTitle"></View>
<View className="popSubtitle">
<View className='bold'>{clockStatistics[0]?.clockNum}</View>{" "}
<View className="bold">{clockStatistics[0]?.clockNum}</View>{" "}
<View className='bold'>
<View className="bold">
{(clockStatistics[0]?.percentage * 100).toFixed(1)}%
</View>
</View>
<View className='img_box'>
<View className="img_box">
{punchInInfo.clockImageList.map((item, index) => (
<View key={item} className='img'>
<Image className='showImg' src={item} mode='widthFix'></Image>
<View key={item} className="img">
<Image className="showImg" src={item} mode="widthFix"></Image>
<Image
className='closeImg'
className="closeImg"
src={require("@/img/close1.png")}
mode='widthFix'
mode="widthFix"
onClick={this.delImg.bind(this, index)}
></Image>
</View>
))}
{punchInInfo.clockImageList.length < 3 && (
<View
className='addBox'
className="addBox"
onClick={this.handleChooseImage.bind(this)}
>
<Image
className='showImg'
className="showImg"
src={require("@/img/clock_in_upload/add-image.png")}
mode='widthFix'
mode="widthFix"
></Image>
</View>
)}
</View>
<View className='info4'>
<View className='content'>
<View className="info4">
<View className="content">
<Textarea
placeholderStyle='color: #ccc; font-size: 26rpx;font-weight: 400;font-family: PingFang SC;'
placeholder='请记录一下今天的护理心得吧'
placeholderStyle="color: #ccc; font-size: 26rpx;font-weight: 400;font-family: PingFang SC;"
placeholder="请记录一下今天的护理心得吧"
maxlength={120}
onInput={this.handleTextareaInput.bind(this)}
value={punchInInfo.clockContent}
></Textarea>
</View>
<View className='tip'>
<View className="tip">
{"" + (punchInInfo.clockContent.length || 0) + "/120"}
</View>
</View>
<View className='popbtnbox flex aitems jcenter'>
<View className='btn1' onClick={this.submit.bind(this)}>
<View className="popbtnbox flex aitems jcenter">
<View className="btn1" onClick={this.submit.bind(this)}>
</View>
</View>

@ -42,6 +42,14 @@ export const Ajax = (params) => {
}
return new Promise((reslove, reject) => {
let token = getStorageSync("token");
if (!token) {
// 如果不存在token且请求的接口不是登录则重新登录
console.log("params", params);
if (params.url.indexOf("/user/login") === -1) {
loginReload(params);
return;
}
}
Taro.request({
url: domain + params.url,
method: params.method || "GET",

Loading…
Cancel
Save