安全意识调查表
This commit is contained in:
parent
3a6985d6fa
commit
9b8f7bfadf
@ -148,7 +148,6 @@
|
|||||||
loadData() {
|
loadData() {
|
||||||
if (this.ID == undefined || this.ID == '') {
|
if (this.ID == undefined || this.ID == '') {
|
||||||
this.stepLoad = false
|
this.stepLoad = false
|
||||||
this.model.Nav_Details = []
|
|
||||||
if (this.ID == undefined || this.ID == '')
|
if (this.ID == undefined || this.ID == '')
|
||||||
this.ID = guid()
|
this.ID = guid()
|
||||||
this.model.ID = this.ID
|
this.model.ID = this.ID
|
||||||
@ -356,33 +355,18 @@
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.modelEdit = JSON.parse(JSON.stringify(this.model))
|
this.modelEdit = JSON.parse(JSON.stringify(this.model))
|
||||||
delete this.modelEdit.Nav_ApplyDepartment
|
// if(this.modelEdit.Nav_JoinDepartment&&this.modelEdit.Nav_JoinDepartment.length>0){
|
||||||
delete this.modelEdit.Nav_ApplyUser
|
// this.modelEdit.Nav_JoinDepartment.map(item=>{
|
||||||
delete this.modelEdit.Nav_Area
|
// delete item.Nav_Department
|
||||||
delete this.modelEdit.Nav_FireDepartment
|
// })
|
||||||
delete this.modelEdit.Nav_FireUser
|
// }
|
||||||
delete this.modelEdit.Nav_OperationStep
|
// if(this.modelEdit.Nav_Points&&this.modelEdit.Nav_Points.length>0){
|
||||||
delete this.modelEdit.Nav_ProductionUnit
|
// this.modelEdit.Nav_Points.map(item=>{
|
||||||
delete this.modelEdit.Nav_SafeUser
|
// delete item.Nav_Point
|
||||||
delete this.modelEdit.Nav_Type
|
// })
|
||||||
if(this.model.Nav_JoinDepartment&&this.model.Nav_JoinDepartment.length>0){
|
// }
|
||||||
this.model.Nav_JoinDepartment.map(item=>{
|
|
||||||
delete item.Nav_Department
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) {
|
|
||||||
this.modelEdit.Nav_Users.map(item => {
|
|
||||||
item.PUBLISH = 'SaveAndNotify'
|
|
||||||
delete item.Nav_Train
|
|
||||||
delete item.Nav_User
|
|
||||||
delete item.Nav_UserType
|
|
||||||
if (item.Nav_UserFiles && item.Nav_UserFiles.length > 0) {
|
|
||||||
item.Nav_UserFiles.map(item1 => {
|
|
||||||
item1.FIRE_JOB_USER_ID = item.ID
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.TaskID == null || this.TaskID == '') {
|
if (this.TaskID == null || this.TaskID == '') {
|
||||||
this.modelEdit.TaskID = '00000000-0000-0000-0000-000000000000'
|
this.modelEdit.TaskID = '00000000-0000-0000-0000-000000000000'
|
||||||
|
|||||||
@ -24,24 +24,21 @@
|
|||||||
<text class="value">{{item.Nav_LaunchUser?item.Nav_LaunchUser.NAME:''}}</text>
|
<text class="value">{{item.Nav_LaunchUser?item.Nav_LaunchUser.NAME:''}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="field">
|
<view class="field">
|
||||||
<text class="label">培训类型:</text>
|
<text class="label">发起部门:</text>
|
||||||
<text class="value">{{item.Nav_TrainType?item.Nav_TrainType.NAME:''}}</text>
|
<text class="value">{{item.Nav_LaunchDepartment?item.Nav_LaunchDepartment.NAME:''}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="field">
|
<view class="field">
|
||||||
<text class="label">培训开始时间:</text>
|
<text class="label">发起时间:</text>
|
||||||
<text class="value">{{item.TRAIN_START_TIME}}</text>
|
<text class="value">{{item.LAUNCH_TIME}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="field">
|
<view class="field">
|
||||||
<text class="label">培训结束时间:</text>
|
<text class="label">截止时间:</text>
|
||||||
<text class="value">{{item.TRAIN_END_TIME}}</text>
|
<text class="value">{{item.END_TIME}}</text>
|
||||||
</view>
|
|
||||||
<view class="field">
|
|
||||||
<text class="label">考核方式:</text>
|
|
||||||
<text class="value">{{item.CHECKTYPE_NAME}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="field">
|
<view class="field">
|
||||||
<text class="label">状态:</text>
|
<text class="label">状态:</text>
|
||||||
<text class="value">{{item.STATUS}}</text>
|
<text class="status">{{item.STATUS}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</common-card>
|
</common-card>
|
||||||
@ -90,7 +87,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.fetchEnums(['SETrainNotifyStatus','PlanCheckType']);
|
this.fetchEnums(['SESafeSurveyStatus']);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fetchEnums(enumNames) {
|
async fetchEnums(enumNames) {
|
||||||
@ -144,25 +141,23 @@
|
|||||||
const json = initFilter(orgId, "", "CREATE_TIME", 1, this.pageIndex)
|
const json = initFilter(orgId, "", "CREATE_TIME", 1, this.pageIndex)
|
||||||
extendInclude(json, "Nav_LaunchDepartment")
|
extendInclude(json, "Nav_LaunchDepartment")
|
||||||
extendInclude(json, "Nav_LaunchUser")
|
extendInclude(json, "Nav_LaunchUser")
|
||||||
extendInclude(json, "Nav_TrainType")
|
|
||||||
// extendInclude(json, "Nav_TrainCheckType")
|
// extendInclude(json, "Nav_TrainCheckType")
|
||||||
if (this.keyword) {
|
if (this.keyword) {
|
||||||
extendRule(json, 'NAME', 9, this.keyword)
|
extendRule(json, 'NAME', 9, this.keyword)
|
||||||
}
|
}
|
||||||
if (this.searchStartTime) {
|
if (this.searchStartTime) {
|
||||||
extendRule(json, 'TRAIN_START_TIME', 6, this.searchStartTime)
|
extendRule(json, 'LAUNCH_TIME', 6, this.searchStartTime)
|
||||||
}
|
}
|
||||||
if (this.filterStatus !== null) {
|
if (this.filterStatus !== null) {
|
||||||
extendRule(json, 'STATUS', 1, this.filterStatus)
|
extendRule(json, 'STATUS', 1, this.filterStatus)
|
||||||
}
|
}
|
||||||
getRequestOrderPage(json, "/SE/TrainNotify/OrderPaged").then(res => {
|
getRequestOrderPage(json, "/SE/SafeSurvey/OrderPaged").then(res => {
|
||||||
this.total = res.TotalCount;
|
this.total = res.TotalCount;
|
||||||
let newRes = (res.Data || []).map(i => {
|
let newRes = (res.Data || []).map(i => {
|
||||||
return {
|
return {
|
||||||
...i,
|
...i,
|
||||||
title: i.NAME,
|
title: i.NAME,
|
||||||
STATUS: i.STATUS !== undefined ? this.enumsData['SETrainNotifyStatus'].find(item => item.code === i.STATUS).name : '',
|
STATUS: i.STATUS !== undefined ? this.enumsData['SESafeSurveyStatus'].find(item => item.code === i.STATUS).name : '',
|
||||||
CHECKTYPE_NAME:i.CHECKTYPE !== undefined ? this.enumsData['PlanCheckType'].find(item => item.code === i.CHECKTYPE).name : '',
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -175,7 +170,7 @@
|
|||||||
},
|
},
|
||||||
showDetail(id) {
|
showDetail(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/apply/subPages/SE/1trainNotifyShow?ID=' + id
|
url: '/pages/apply/subPages/SE/11safeSurveyShow?ID=' + id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleShowPicker(p) {
|
handleShowPicker(p) {
|
||||||
@ -184,7 +179,7 @@
|
|||||||
column = ['全部', '当天', '最近三天', '最近一周', '最近一月']
|
column = ['全部', '当天', '最近三天', '最近一周', '最近一月']
|
||||||
}
|
}
|
||||||
if (p.name === 'status') {
|
if (p.name === 'status') {
|
||||||
column = this.enumsText['SETrainNotifyStatus']
|
column = this.enumsText['SESafeSurveyStatus']
|
||||||
}
|
}
|
||||||
this.comPickerInfo = {
|
this.comPickerInfo = {
|
||||||
showPicker: true,
|
showPicker: true,
|
||||||
@ -212,7 +207,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.comPickerInfo.name === 'status') {
|
if (this.comPickerInfo.name === 'status') {
|
||||||
this.filterStatus = this.enumsData['SETrainNotifyStatus'][e.indexs[0]].code
|
this.filterStatus = this.enumsData['SESafeSurveyStatus'][e.indexs[0]].code
|
||||||
this.statusFilterTxt = e.value[0]
|
this.statusFilterTxt = e.value[0]
|
||||||
}
|
}
|
||||||
this.closePicker()
|
this.closePicker()
|
||||||
|
|||||||
@ -1,91 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="todo-page">
|
<view class="todo-page">
|
||||||
<view class="card" >
|
<view class="card">
|
||||||
<view class="background"></view>
|
<view class="background"></view>
|
||||||
<view>
|
<view>
|
||||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="model" class="demo-ruleForm">
|
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="model" class="demo-ruleForm">
|
||||||
<u-form-item label="培训名称:" prop="NAME" borderBottom>
|
<u-form-item required label="筛选" @click="handleShowSheet({title: '筛选', name: 'Nav_JoinDepartment'})" borderBottom>
|
||||||
<u--input v-model="model.NAME" border="none" slot="right" inputAlign="right" disabled
|
<u--input disabledColor="#fff" v-model="type" disabled placeholder="请选择筛选条件" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px" border="none"
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
customStyle="margin:0px;display:flex;padding:3px 0px" inputAlign="right">
|
||||||
</u-form-item>
|
</u--input>
|
||||||
<u-form-item label="发起时间:" prop="LAUNCH_TIME" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="model.LAUNCH_TIME" border="none" slot="right" inputAlign="right" disabled
|
<u-form-item label="调查名称:" prop="NAME" borderBottom>
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
<u--input v-model="model.NAME" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="发起部门:" prop="Nav_LaunchDepartment.NAME" borderBottom>
|
<u-form-item label="发起时间:" prop="LAUNCH_TIME" borderBottom>
|
||||||
<u--input v-if="model.Nav_LaunchDepartment" v-model="model.Nav_LaunchDepartment.NAME" border="none"
|
<u--input v-model="model.LAUNCH_TIME" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
||||||
slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item label="发起部门:" prop="Nav_LaunchDepartment.NAME" borderBottom>
|
||||||
<u-form-item label="发起人员:" prop="Nav_LaunchUser.NAME" borderBottom>
|
<u--input v-if="model.Nav_LaunchDepartment" v-model="model.Nav_LaunchDepartment.NAME" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
||||||
<u--input v-if="model.Nav_LaunchUser" v-model="model.Nav_LaunchUser.NAME" border="none" slot="right"
|
</u-form-item>
|
||||||
inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
<u-form-item label="发起人员:" prop="Nav_LaunchUser.NAME" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-if="model.Nav_LaunchUser" v-model="model.Nav_LaunchUser.NAME" border="none" slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
||||||
<u-form-item label="培训类型:" prop="Nav_LaunchUser.NAME" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-if="model.Nav_TrainType" v-model="model.Nav_TrainType.NAME" border="none" slot="right"
|
<u-form-item label="截止时间:" prop="END_TIME" borderBottom>
|
||||||
inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
<u--input v-model="model.END_TIME" border="none" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="培训级别:" prop="LEVEL" borderBottom>
|
<u-form-item label="参与人员">
|
||||||
<u--input v-model="model.LEVEL" border="none" slot="right" inputAlign="right" disabled
|
<!-- <u-icon name="arrow-down" size="12" slot="right"></u-icon> -->
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
</u-form-item>
|
||||||
</u-form-item>
|
<view class="tag-view" v-if="model.Nav_JoinDepartment">
|
||||||
<u-form-item label="开始时间:" prop="TRAIN_START_TIME" borderBottom>
|
<uni-tag class="tag" v-for="(i, k) in model.Nav_JoinDepartment.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.Nav_Department.NAME" type="primary" />
|
||||||
<u--input v-model="model.TRAIN_START_TIME" border="none" inputAlign="right" disabled
|
</view>
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
<u-form-item label="调查内容">
|
||||||
</u-form-item>
|
<!-- <u-icon name="arrow-down" size="12" slot="right"></u-icon> -->
|
||||||
<u-form-item label="结束时间:" prop="TRAIN_END_TIME" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="model.TRAIN_END_TIME" border="none" inputAlign="right" disabled
|
<view class="tag-view" v-if="model.Nav_Points">
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
<uni-tag class="tag" v-for="(i, k) in model.Nav_Points.filter(i => !i.IS_DELETED)" :key="k" :inverted="true" :text="i.Nav_Point.NAME" type="primary" />
|
||||||
</u-form-item>
|
</view>
|
||||||
<u-form-item label="培训地点:" prop="TRAIN_ADDR" borderBottom>
|
<view class="table-container" v-if="ROWS && ROWS.length > 0">
|
||||||
<u--input v-model="model.TRAIN_ADDR" border="none" slot="right" inputAlign="right" disabled
|
<table>
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
<tr>
|
||||||
</u-form-item>
|
<th colspan="100%" style="text-align: center; background-color: #f5f7fa; font-weight: bold; padding: 12px;">
|
||||||
<u-form-item label="培训学时:" prop="HOURS" borderBottom>
|
答案正确率(百分比)
|
||||||
<u--input v-model="model.HOURS" border="none" slot="right" inputAlign="right" disabled
|
</th>
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
</tr>
|
||||||
</u-form-item>
|
<!-- 动态渲染表格行 -->
|
||||||
<u-form-item label="培训老师:" prop="TRAIN_TEACHER" borderBottom>
|
<tr v-for="(row, rowIndex) in ROWS" :key="rowIndex">
|
||||||
<u--input v-model="model.TRAIN_TEACHER" border="none" slot="right" inputAlign="right" disabled
|
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
|
||||||
</u-form-item>
|
|
||||||
<u-form-item label="培训形式:" prop="" borderBottom>
|
|
||||||
<u--input v-model="model.TRAIN_MODEL" border="none" inputAlign="right" disabled
|
|
||||||
disabledColor="#ffffff" fontSize="14px"></u--input>
|
|
||||||
</u-form-item>
|
|
||||||
<u-form-item label="考核方式:" prop="Nav_TrainCheckType.NAME" borderBottom>
|
|
||||||
<u--input v-model="model.CHECKTYPE_NAME" border="none"
|
|
||||||
slot="right" inputAlign="right" disabled disabledColor="#ffffff" fontSize="14px"></u--input>
|
|
||||||
</u-form-item>
|
|
||||||
<u-form-item label="培训内容:" prop="TRAINCONTENT" borderBottom>
|
|
||||||
</u-form-item>
|
|
||||||
<u-textarea autoHeight v-html="model.TRAINCONTENT" border="none" disabled></u-textarea>
|
|
||||||
<u-form-item label="培训安排及要求:" prop="TRAIN_PLAN" borderBottom>
|
|
||||||
</u-form-item>
|
|
||||||
<u--textarea v-model="model.TRAIN_PLAN" border="none" disabled></u--textarea>
|
|
||||||
<u-form-item label="培训人员:" prop="users" >
|
|
||||||
</u-form-item>
|
|
||||||
<rich-text v-html="model.users" border="none" disabled style="font-size: 14px;"></rich-text>
|
|
||||||
<view class="upload-title">附件</view>
|
|
||||||
<full-upload v-model="model.Nav_Files" :listProp='listPropUpload'
|
|
||||||
:listPropVal='listPropValUpload' :isShowBtn="false"></full-upload>
|
|
||||||
</u--form>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<uni-card class="btn-wrap" :is-shadow="true" v-if="isLoadOK&&tableKey==1">
|
<!-- 如果是第一行,使用 u-th 作为表头 -->
|
||||||
<u--form>
|
<template v-if="rowIndex === 0">
|
||||||
<view class="btn-wrap">
|
<th v-for="(cell, cellIndex) in row" :key="cellIndex">{{ cell }}</th>
|
||||||
<view>
|
</template>
|
||||||
<u--textarea height='3em' v-model="LEAVE_REASON" placeholder="请输入请假理由"></u--textarea>
|
<!-- 其他行使用 u-td -->
|
||||||
|
<template v-else>
|
||||||
|
<td v-for="(cell, cellIndex) in row" :key="cellIndex">{{ cell }}<span v-if="cellIndex!==0">%</span></td>
|
||||||
|
</template>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</view>
|
</view>
|
||||||
<view class="buttons">
|
</u--form>
|
||||||
<u-button type="primary" color="#3d4b70" class="btn first-btn" @click="onChargeUserAgree(1)"
|
</view>
|
||||||
text="参加"></u-button>
|
|
||||||
<u-button color="#3d4b70" :plain="true" type="warning" @click="onChargeUserAgree(2)" text="请假"></u-button>
|
</view>
|
||||||
</view>
|
<u-picker :show="comPickerInfo.showSheet" :columns="comPickerInfo.columns" @confirm="onConfirmPicker" @close="closePicker" @cancel="closePicker" keyName="NAME"></u-picker>
|
||||||
</view>
|
|
||||||
</u--form>
|
|
||||||
</uni-card>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -118,134 +94,78 @@
|
|||||||
listPropUpload: ['NOTIFY_ID'],
|
listPropUpload: ['NOTIFY_ID'],
|
||||||
listPropValUpload: [],
|
listPropValUpload: [],
|
||||||
Lists: [],
|
Lists: [],
|
||||||
|
type: '部门',
|
||||||
|
ROWS: [],
|
||||||
|
comPickerInfo: {
|
||||||
|
showSheet: false,
|
||||||
|
columns: [],
|
||||||
|
title: '',
|
||||||
|
dataIndex: undefined,
|
||||||
|
formIndex: undefined,
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.model.ID = option.ID;
|
this.model.ID = option.ID;
|
||||||
|
this.model.ORG_ID_HV = option.ORG_ID_HV
|
||||||
this.TaskID = option.taskID;
|
this.TaskID = option.taskID;
|
||||||
this.tableKey = option.tableKey ? option.tableKey : '0'
|
this.tableKey = option.tableKey ? option.tableKey : '0'
|
||||||
|
|
||||||
this.getEnums()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getEnums(){
|
|
||||||
var dataParm = {
|
|
||||||
'name': "PlanCheckType"
|
|
||||||
}
|
|
||||||
getEnum(dataParm).then(res => {
|
|
||||||
this.Lists = res.map(i => {
|
|
||||||
return {
|
|
||||||
...i,
|
|
||||||
name: i.NAME,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.loadData()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
loadData() {
|
loadData() {
|
||||||
const json = initFilter(this.orgId, "", "CODE", 1)
|
const json = initFilter(this.orgId, "", "CODE", 1)
|
||||||
extendRule(json, 'ID', 1, this.model.ID);
|
json.Parameter22 = this.model.ORG_ID_HV;
|
||||||
extendInclude(json, 'Nav_LaunchDepartment');
|
json.OrgType = 2;
|
||||||
extendInclude(json, 'Nav_LaunchUser');
|
json.Parameter3 = this.type;
|
||||||
extendInclude(json, 'Nav_TrainType');
|
json.Parameter1 = this.model.ID;
|
||||||
// extendInclude(json, 'Nav_TrainCheckType');
|
|
||||||
extendInclude(json, 'Nav_TrainContentList');
|
getRequest(json, "/SE/SESafeSurvey/GetReport").then(res => {
|
||||||
extendInclude(json, 'Nav_TrainContentList.Nav_Point');
|
this.model = res.SURVEY[0]
|
||||||
extendInclude(json, 'Nav_TrainUserList');
|
this.ROWS = res.ROWS
|
||||||
extendInclude(json, 'Nav_TrainUserList.Nav_User');
|
|
||||||
extendInclude(json, 'Nav_Files.Nav_ImgFile');
|
|
||||||
getRequest(json, "/SE/TrainNotify/Get").then(res => {
|
|
||||||
this.model = res
|
|
||||||
let trainContent = '';
|
|
||||||
let users = '';
|
|
||||||
if (res.Nav_TrainContentList && res.Nav_TrainContentList.length > 0) {
|
|
||||||
for (let i = 0; i < res.Nav_TrainContentList.length; i++) {
|
|
||||||
trainContent += (i + 1) + "." + res.Nav_TrainContentList[i].Nav_Point.NAME + "<br/>"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (res.Nav_TrainUserList && res.Nav_TrainUserList.length > 0) {
|
|
||||||
for (let i = 0; i < res.Nav_TrainUserList.length; i++) {
|
|
||||||
if (res.Nav_TrainUserList[i].IS_LEAVE == 0) {
|
|
||||||
users += (users.length > 0 ? " " : "") +
|
|
||||||
"<view style='color:#E35D58;background-color:rgba(227,93,88,0.2);padding:5px;line-height:30px;white-space:nowrap;'>" +
|
|
||||||
res.Nav_TrainUserList[i].Nav_User.NAME + "</view>";
|
|
||||||
} else if (res.Nav_TrainUserList[i].IS_LEAVE == 1) {
|
|
||||||
users += (users.length > 0 ? " " : "") +
|
|
||||||
"<text style='padding:5px;line-height:30px;white-space:nowrap;'>" +
|
|
||||||
res.Nav_TrainUserList[i].Nav_User.NAME + "</text>";
|
|
||||||
} else if (res.Nav_TrainUserList[i].IS_LEAVE == 2) {
|
|
||||||
users += (users.length > 0 ? " " : "") +
|
|
||||||
"<text style='padding:5px;line-height:30px;white-space:nowrap;'>" +
|
|
||||||
res.Nav_TrainUserList[i].Nav_User.NAME + "(请假)</text>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.model.CHECKTYPE_NAME = res.CHECKTYPE !== undefined ? this.Lists.find(item => item.ID === res.CHECKTYPE).name : '';
|
|
||||||
this.model.TRAIN_MODEL = this.returnModel(this.model.TRAIN_MODEL);
|
|
||||||
this.model.LEVEL = this.transLevel(this.model.LEVEL);
|
|
||||||
this.model.TRAINCONTENT = trainContent;
|
|
||||||
this.model.users = users;
|
|
||||||
this.isLoadOK = true;
|
this.isLoadOK = true;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
returnModel(level) {
|
//下拉数据加载
|
||||||
let str = '';
|
async handleShowSheet(p) {
|
||||||
if (level == undefined) {
|
const orgId = uni.getStorageSync('orgId')
|
||||||
return str;
|
const json = initFilter(orgId, "", "", 0)
|
||||||
}
|
let dataSelect = ['部门', '人员', '岗位']
|
||||||
if (level.indexOf('1') >= 0) {
|
if (dataSelect.length) {
|
||||||
str += '讲授法 ';
|
this.comPickerInfo = {
|
||||||
}
|
showSheet: true,
|
||||||
if (level.indexOf('2') >= 0) {
|
title: p.title,
|
||||||
str += '视听法 ';
|
name: p.name,
|
||||||
}
|
dataIndex: p.dataIndex,
|
||||||
if (level.indexOf('3') >= 0) {
|
columns: [dataSelect]
|
||||||
str += '研讨法 ';
|
}
|
||||||
}
|
} else {
|
||||||
if (level.indexOf('4') >= 0) {
|
// 暂无数据
|
||||||
str += '演示法 ';
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
},
|
|
||||||
transLevel(level) {
|
|
||||||
if (level == 0) {
|
|
||||||
return '部门 ';
|
|
||||||
}
|
|
||||||
if (level == 1) {
|
|
||||||
return '车间 ';
|
|
||||||
}
|
|
||||||
if (level == 2) {
|
|
||||||
return '班组 ';
|
|
||||||
}
|
|
||||||
if (level == 3) {
|
|
||||||
return '公司 ';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChargeUserAgree(type) {
|
// 整改实施单位 departmentName Nav_DepartmentDeal 整改责任人 Nav_UserDeal userDetailer 验收人Nav_UserCheck userChecker
|
||||||
if (type == 2) {
|
|
||||||
if (this.LEAVE_REASON == "" || this.LEAVE_REASON == null) {
|
|
||||||
uni.$showMsgFunc('请填写请假理由!', () => {
|
|
||||||
}, 'error', 1000);
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let json = {
|
|
||||||
USER_ID: uni.getStorageSync('appInfo').User.ID,
|
|
||||||
ORG_ID: this.ORG_ID,
|
|
||||||
NOTIFY_ID: this.model.ID,
|
|
||||||
LEAVE_REASON: this.LEAVE_REASON,
|
|
||||||
IS_LEAVE: type,
|
|
||||||
TaskID: this.TaskID,
|
|
||||||
};
|
|
||||||
getRequest(json, "/SE/SETrainNotify/TrainPersonStatus").then(res => {
|
|
||||||
if (res) {
|
|
||||||
uni.$showMsgFunc('操作成功!', () => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 'success', 1000)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
onConfirmPicker(e) {
|
||||||
|
const {
|
||||||
|
name,
|
||||||
|
dataIndex
|
||||||
|
} = this.comPickerInfo
|
||||||
|
this.type = e.value[0]
|
||||||
|
this.comPickerInfo.showSheet = false
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
|
||||||
|
closePicker() {
|
||||||
|
this.comPickerInfo = {
|
||||||
|
showSheet: false,
|
||||||
|
columns: [],
|
||||||
|
title: '',
|
||||||
|
name: '',
|
||||||
|
formIndex: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
@ -264,16 +184,19 @@
|
|||||||
background: #edf1fd;
|
background: #edf1fd;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.todo-page {
|
.todo-page {
|
||||||
/* padding-bottom: 10px; */
|
/* padding-bottom: 10px; */
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
margin: 20px 16px 180px 16px;
|
margin: 20px 16px 180px 16px;
|
||||||
padding: 20px 30px 80px 30px;
|
padding: 20px 30px 80px 30px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-title {
|
.upload-title {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #8e8b9c;
|
color: #8e8b9c;
|
||||||
@ -292,6 +215,7 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, .05);
|
box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, .05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-wrap>>>.u-textarea__field {
|
.btn-wrap>>>.u-textarea__field {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
@ -309,6 +233,7 @@
|
|||||||
.buttons .first-btn {
|
.buttons .first-btn {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-ruleForm>>>.u-form-item__body__left__content__label {
|
.demo-ruleForm>>>.u-form-item__body__left__content__label {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #8e8b9c;
|
color: #8e8b9c;
|
||||||
@ -323,6 +248,7 @@
|
|||||||
.demo-ruleForm>>>.u-textarea__field {
|
.demo-ruleForm>>>.u-textarea__field {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-ruleForm>>>.u-textarea {
|
.demo-ruleForm>>>.u-textarea {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
@ -330,4 +256,95 @@
|
|||||||
.demo-ruleForm>>>.u-cell__title-text {
|
.demo-ruleForm>>>.u-cell__title-text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 表格样式 */
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 16px 0;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表头样式 */
|
||||||
|
th {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
padding: 12px 8px;
|
||||||
|
border-bottom: 1px solid #e0e0e0;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表体单元格样式 */
|
||||||
|
td {
|
||||||
|
padding: 12px 8px;
|
||||||
|
text-align: center;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
color: #333;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 隔行变色效果 */
|
||||||
|
tr:nth-child(even) td {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 最后一行底部边框去除 */
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 首列和尾列适当加宽 */
|
||||||
|
th:first-child,
|
||||||
|
td:first-child {
|
||||||
|
padding-left: 16px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
th:last-child,
|
||||||
|
td:last-child {
|
||||||
|
padding-right: 16px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表头与数据行之间的分割线 */
|
||||||
|
tr:first-child th {
|
||||||
|
border-bottom: 1px solid #d0d7e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 悬停效果(可选) */
|
||||||
|
tr:hover td {
|
||||||
|
background-color: #f0f8ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 移动端优化:允许横向滚动 */
|
||||||
|
.table-container {
|
||||||
|
overflow-x: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
margin: 16px -8px;
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 如果希望表格固定在卡片内,可以这样调整 */
|
||||||
|
.card table {
|
||||||
|
margin-left: -8px;
|
||||||
|
margin-right: -8px;
|
||||||
|
width: calc(100% + 16px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 小屏幕优化 */
|
||||||
|
@media (max-width: 375px) {
|
||||||
|
table {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
padding: 10px 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user