199 lines
		
	
	
		
			6.4 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			199 lines
		
	
	
		
			6.4 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
	<view style="padding-bottom: 80px;">
 | 
						|
		<view class="card">
 | 
						|
			<view class="background"></view>
 | 
						|
			<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="model" class="demo-ruleForm">
 | 
						|
				<u-form-item label="活动主题:" prop="TITLE" borderBottom>
 | 
						|
					<u--input v-model="model.TITLE" border="none" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
 | 
						|
				</u-form-item>
 | 
						|
				<u-form-item label="活动日期:" prop="ACTIVITY_TIME" borderBottom>
 | 
						|
					<u--input v-model="model.ACTIVITY_TIME" border="none" slot="right"
 | 
						|
						inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
 | 
						|
				</u-form-item>
 | 
						|
				<u-form-item label="活动地点:" prop="ADDRESS" borderBottom>
 | 
						|
					<u--input v-model="model.ADDRESS" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
 | 
						|
				</u-form-item>
 | 
						|
				<u-form-item label="班组名称:" prop="Nav_Taem.NAME" borderBottom>
 | 
						|
					<u--input v-if="model.Nav_Taem" v-model="model.Nav_Taem.NAME" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
 | 
						|
				</u-form-item>
 | 
						|
				<u-form-item label="主持人:" prop="Nav_MainUser.NAME" borderBottom>
 | 
						|
					<u--input v-model="model.Nav_MainUser.NAME" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
 | 
						|
				</u-form-item>
 | 
						|
				<u-form-item label="记录人:" prop="Nav_User.NAME" borderBottom>
 | 
						|
					<u--input v-model="model.Nav_User.NAME" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
 | 
						|
				</u-form-item>
 | 
						|
				<u-form-item label="活动时长:" prop="DURATION" borderBottom>
 | 
						|
					<u--input v-model="model.DURATION" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
 | 
						|
				</u-form-item>
 | 
						|
				<u-form-item label="参会人员:" prop="UserNames"  >
 | 
						|
				</u-form-item>
 | 
						|
				<rich-text style="line-height: 30px;" autoHeight type="textarea" v-html="model.UserNames" border="none" 
 | 
						|
					inputAlign="right" disabled class="richtext"></rich-text>
 | 
						|
				<u-form-item label="活动记录:" prop="ACTIVITY_CONTENT" >
 | 
						|
				</u-form-item>
 | 
						|
				<u--textarea  autoHeight v-model="model.ACTIVITY_CONTENT" border="" inputAlign="right" disabled></u--textarea>
 | 
						|
				<view class="upload-title">附件</view>
 | 
						|
				<full-upload v-model="model.Nav_TeamActivityFile" :listProp='listPropUpload'
 | 
						|
					:listPropVal='listPropValUpload' :isShowBtn="false"></full-upload>
 | 
						|
			</u--form>
 | 
						|
		</view>
 | 
						|
		<view class="bottom-button"  style="padding: 10px 16px;" v-if="isLoadOK&&tableKey==1">
 | 
						|
			<u-button type="primary"
 | 
						|
			@click="onTableBtnAgree" color="#3d4b70">签到</u-button>
 | 
						|
		</view>
 | 
						|
		<!-- <button type="primary" class="bottom" v-if='isLoadOK&&tableKey==1' @click="onTableBtnAgree">签到</button> -->
 | 
						|
	</view>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
	import {
 | 
						|
		initFilter,
 | 
						|
		extendRule,
 | 
						|
		extendInclude
 | 
						|
	} from '../../../../utils/common'
 | 
						|
 | 
						|
	import {
 | 
						|
		getRequest,
 | 
						|
	} from '../../../../services/apply/FOServices/FOServices'
 | 
						|
 | 
						|
	import '../../../../utils/showMsg.js'
 | 
						|
	import color from '../../../../uni_modules/uview-ui/libs/config/color'
 | 
						|
	import config from '../../../../config/common'
 | 
						|
 | 
						|
	export default {
 | 
						|
		data() {
 | 
						|
			return {
 | 
						|
				model: {
 | 
						|
					Nav_Taem:"",
 | 
						|
					Nav_User:"",
 | 
						|
					Nav_MainUser:""
 | 
						|
				},
 | 
						|
				listPropUpload: ['TEAM_ACTIVITY_ID'],
 | 
						|
				listPropValUpload: [],
 | 
						|
				TaskID: "",
 | 
						|
				tableKey: '0',
 | 
						|
				isLoadOK: false,
 | 
						|
			}
 | 
						|
		},
 | 
						|
		onLoad(option) {
 | 
						|
			this.model.ID = option.ID;
 | 
						|
			this.TaskID = option.taskID;
 | 
						|
			this.tableKey = option.tableKey ? option.tableKey : '0'
 | 
						|
			this.loadData()
 | 
						|
		},
 | 
						|
		methods: {
 | 
						|
			loadData() {
 | 
						|
				const orgId = uni.getStorageSync('orgId')
 | 
						|
				const json = initFilter(orgId, "", "CODE", 1)
 | 
						|
				extendRule(json, 'ID', 1, this.model.ID);
 | 
						|
				extendInclude(json, "Nav_Taem")
 | 
						|
				extendInclude(json, "Nav_User")
 | 
						|
				extendInclude(json, "Nav_MainUser")
 | 
						|
				extendInclude(json, 'Nav_TeamActivityUser.Nav_User');
 | 
						|
				extendInclude(json, 'Nav_TeamActivityFile.Nav_ImgFile');
 | 
						|
				getRequest(json,"/FO/TeamActivity/Get").then(res => {
 | 
						|
					this.model = res
 | 
						|
					if(res.USER_ID == null)
 | 
						|
					{
 | 
						|
						// res.USER_ID = uni.getStorageSync('appInfo').User.ID;
 | 
						|
						res.Nav_MainUser = {};
 | 
						|
					}
 | 
						|
					//数据组装
 | 
						|
					let strUserName = ''
 | 
						|
					if (res.Nav_TeamActivityUser && res.Nav_TeamActivityUser.length > 0) {
 | 
						|
						for (let i = 0; i < res.Nav_TeamActivityUser.length; i++) {
 | 
						|
							if(res.Nav_TeamActivityUser[i].ATTEND_STATUS == 1)
 | 
						|
							{
 | 
						|
								if (res.Nav_TeamActivityUser[i].SIGN_IN_STATUS == 0) {
 | 
						|
									strUserName += (strUserName.length > 0 ? "  " : "") + "<text style='color:red'>" +
 | 
						|
										res.Nav_TeamActivityUser[i].Nav_User.NAME + "</text>";
 | 
						|
								} else {
 | 
						|
									strUserName += (strUserName.length > 0 ? "  " : "") + res.Nav_TeamActivityUser[
 | 
						|
										i].Nav_User.NAME;
 | 
						|
								}
 | 
						|
							}
 | 
						|
						}
 | 
						|
					}
 | 
						|
					
 | 
						|
					this.model.ACTIVITY_TIME = this.model.ACTIVITY_TIME.substring(0,10);
 | 
						|
					this.model.UserNames = strUserName;
 | 
						|
					this.isLoadOK = true
 | 
						|
				})
 | 
						|
			},
 | 
						|
			onTableBtnAgree() {
 | 
						|
				let json = {};
 | 
						|
				json.ID = this.model.ID;
 | 
						|
				json.TaskID = this.TaskID;
 | 
						|
				getRequest(json,"/FO/FOTeamActivity/TeamActivityUserUpdate").then(res => {
 | 
						|
					if (res) {
 | 
						|
						uni.$showMsgFunc('操作成功!', () => {
 | 
						|
							uni.navigateBack()
 | 
						|
						}, 'success', 1000)
 | 
						|
					}
 | 
						|
				})
 | 
						|
 | 
						|
			}
 | 
						|
		},
 | 
						|
		computed: {
 | 
						|
 | 
						|
		}
 | 
						|
	}
 | 
						|
</script>
 | 
						|
 | 
						|
<style>
 | 
						|
	/* @import url("@/style/css/editTemplate.css"); */
 | 
						|
	.card {
 | 
						|
		margin: 20px 16px 80px 16px;
 | 
						|
		/* border: 1px solid #EBEEF5; */
 | 
						|
		padding: 20px 30px 80px 30px;
 | 
						|
		/* box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3px 1px; */
 | 
						|
		background-color: #ffffff;
 | 
						|
		border-radius: 10px;
 | 
						|
	}
 | 
						|
	.background {
 | 
						|
		position: fixed;
 | 
						|
		top: 0;
 | 
						|
		left: 0;
 | 
						|
		right: 0;
 | 
						|
		bottom: 0;
 | 
						|
		background: #edf1fd;
 | 
						|
		z-index: -1;
 | 
						|
	}
 | 
						|
	.richtext {
 | 
						|
		font-size: 14px;
 | 
						|
		
 | 
						|
	}
 | 
						|
	.demo-ruleForm>>>.u-form-item__body__left__content__label {
 | 
						|
		font-size: 14px;
 | 
						|
		color: #8e8b9c;
 | 
						|
		/* justify-content: flex-start; */
 | 
						|
	}
 | 
						|
	
 | 
						|
	.demo-ruleForm>>>.u-form-item__body__left__content__ {
 | 
						|
		left: -11px;
 | 
						|
		top: 0px
 | 
						|
	}
 | 
						|
	
 | 
						|
	.demo-ruleForm>>>.u-textarea__field {
 | 
						|
		font-size: 14px;
 | 
						|
	}
 | 
						|
	.demo-ruleForm>>>.u-cell__title-text {
 | 
						|
		font-size: 14px;
 | 
						|
	}
 | 
						|
	.upload-title {
 | 
						|
		font-size: 14px;
 | 
						|
		color: #8e8b9c;
 | 
						|
		line-height: 22px;
 | 
						|
		padding: 8px 0px;
 | 
						|
	}
 | 
						|
	.bottom-button {
 | 
						|
		position: fixed;
 | 
						|
		bottom: 0;
 | 
						|
		left: 0;
 | 
						|
		width: 100%;
 | 
						|
		padding: 10px 16px;
 | 
						|
		box-sizing: border-box;
 | 
						|
		background: #edf1fd;
 | 
						|
		z-index: 999;
 | 
						|
	}
 | 
						|
</style> |