(function($) {
	//0并行分支,1手动分支,2条件分支 
	Vue.component('flow-process', {
		template: '\
        		<section>\
	        		<div class="mui-card-header"><b>流程办理</b></div>\
					<template v-if="tmodel.pathJudgeType.value == 1">\
						<div class="mui-table-view-cell mui-input-row">\
							<label>下一环节</label>\
							<select id="nextTmodelId" name="nextTmodelId" class="" placeholder="" v-model="selModelId">\
								<option v-for="nextTmodel in nextTmodels" v-bind:value="nextTmodel.nextTmodelId.tmodelId">{{nextTmodel.nextTmodelId.tmodelName}}</option>\
							</select>\
						</div>\
						<template v-for="nextHandTmodel in nextHandTmodels">\
							<div class="mui-table-view-cell mui-input-row" style="height: auto;" v-show="nextHandTmodel.nextTmodelId.tmodelId == selModelId">\
								<label>下一环节操作人</label>\
								<input v-bind:id="nextHandTmodel.nextTmodelId.tmodelId" v-bind:name="nextHandTmodel.nextTmodelId.tmodelId" type="text" readonly="readonly" placeholder="选择人员" @click="openUser(nextHandTmodel)">\
							</div>\
						</template>\
					</template>\
					<template v-if="tmodel.pathJudgeType.value == 0">\
						<div class="mui-table-view-cell mui-input-row" v-if="nextHandTmodels.length > 0">\
							<label style="width: 100%;">下一环节操作人</label>\
						</div>\
						<div class="mui-table-view-cell mui-input-row" style="height: auto;" v-for="nextHandTmodel in nextHandTmodels">\
							<label>{{nextHandTmodel.nextTmodelId.tmodelName}}</label>\
							<input v-bind:id="nextHandTmodel.nextTmodelId.tmodelId" v-bind:name="nextHandTmodel.nextTmodelId.tmodelId" type="text" readonly="readonly" placeholder="选择人员" @click="openUser(nextHandTmodel)">\
						</div>\
					</template>\
					<div class="mui-table-view-cell mui-input-row">\
						<label>当前环节名称</label>\
						<input type="text" readonly="readonly" :value="tmodel.tmodelName">\
					</div>\
					<div class="mui-table-view-cell mui-input-row">\
						<label>环节备注</label>\
						<textarea id="remark1" name="remark1" rows="4" placeholder="输入环节备注"></textarea>\
					</div>\
					<div class="mui-card" style="margin: 0;">\
						<div class="mui-card-header"><b>流转过程</b></div>\
						<div class="mui-card-footer" v-for="processTache in processList">\
							<template v-if="processTache.state == \'2\'">\
								<span><img class="liuzhuan_img" src="../../images/liuzhuang_zt.png"></span>状态:<span class="liuzhuan_cg">{{processTache.dataName}}</span><br>\
							</template>\
							<template v-else-if="processTache.state == \'1\'" >\
								<span><img class="liuzhuan_img" src="../../images/liuzhuang_zt.png"></span>状态:<span style="color:blue">{{processTache.dataName}}</span><br>\
							</template>\
							<template v-else >\
								<span><img class="liuzhuan_img" src="../../images/liuzhuang_zt.png"></span>状态:<span class="liuzhuan_z">{{processTache.dataName}}</span><br>\
							</template>\
							<span><img class="liuzhuan_img" src="../../images/liuzhuang_hj.png"></span><span>环节名称:{{processTache.tmodelName}}({{processTache.name}})</span><br>\
							<span><img class="liuzhuan_img" src="../../images/liuzhuang_cj.png"></span><span>创建时间:{{processTache.createdate}}</span><br>\
							<template v-if="processTache.finishdate != \'\'">\
								<span><img class="liuzhuan_img" src="../../images/liuzhuang_bl.png" ></span><span>办理时间:{{processTache.finishdate}}</span><br>\
							</template>\
						</div>\
					</div>\
				</section>\
        		',
		props: ['selModelId', 'tmodel', 'nextTmodels', 'nextHandTmodels','processList'],
		methods: {
			openUser: function(nextHandTmodel) {
				choosePerson({
					'backId': nextHandTmodel.nextTmodelId.tmodelId,
					'isMultiDept': '1'
				})
			}
		},
		//组件渲染之前
		created: function() {},
		//组件渲染之后
		mounted: function() {}
	});

})(jQuery);