安全风险辨识与评估计划表
This commit is contained in:
parent
f75e764e4c
commit
c01ff5f690
@ -37,6 +37,14 @@
|
||||
</u--input> -->
|
||||
</u-form-item>
|
||||
<u--textarea v-model="dataModel.CONTENTS" placeholder="请输入内容" autoHeight></u--textarea>
|
||||
<u-form-item label="辨识要求" borderBottom @click="handleShowSheet({title: '辨识要求', name: 'Nav_Requires'})">
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12" slot="right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-textarea v-model="dataModel.Nav_RequiresName" disabled autoHeight placeholder="请选择辨识要求"></u-textarea>
|
||||
<u-form-item label="评估要求" borderBottom @click="handleShowSheet({title: '评估要求', name: 'Nav_Evaluations'})">
|
||||
<u-icon style="margin-left: 4px;" name="arrow-down" size="12" slot="right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-textarea v-model="dataModel.Nav_EvaluationsName" disabled autoHeight placeholder="请选择评估要求"></u-textarea>
|
||||
<view class="upload-title">附件:</view>
|
||||
<full-upload v-model="dataModel.Nav_Files" :isShowBtn='true' :listProp='listPropUpload' :listPropVal='listPropValUpload'></full-upload>
|
||||
|
||||
@ -47,11 +55,7 @@
|
||||
</view>
|
||||
|
||||
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">辨识与评估确认</view> -->
|
||||
<u-form-item label="辨识与评估" @click="handleNewCheckContent">
|
||||
<u-button text="新增部门与辨识人员" size="small" type="primary" style="margin-left: 30%;"></u-button>
|
||||
<!-- <u-icon name="plus-circle" size="24" color="#3d9cff" slot="right"></u-icon> -->
|
||||
</u-form-item>
|
||||
<view v-for="(item,index) in dataModel.Nav_Details" :key="index" style="border-bottom: #ceccca 1px dashed;padding-bottom: 10px;">
|
||||
<view v-for="(item,index) in dataModel.Nav_Details.filter(i => !i.IS_DELETED)" :key="index" style="border-bottom: #ceccca 1px dashed;padding-bottom: 10px;">
|
||||
<u-form-item>
|
||||
<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;flex: 1;">
|
||||
<view @click="handleChangeStep(index)" style="flex: 1;display: flex;flex-direction: row;align-items: center;">
|
||||
@ -62,7 +66,7 @@
|
||||
</u-icon>
|
||||
</view>
|
||||
<view class="action" style="display: flex;flex-direction: row;align-items: center;justify-content: space-around;">
|
||||
<u-icon @click="handleDelRowBefore(index)" name="trash" color="#ff4d4f" size="21"></u-icon>
|
||||
<u-icon @click="handleDelRowBefore(item)" name="trash" color="#ff4d4f" size="21"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
@ -76,8 +80,9 @@
|
||||
|
||||
</u--form>
|
||||
</view>
|
||||
<view style="padding: 10px 16px;" class="bottom-button">
|
||||
<u-button type="primary" @click="submit" color="#3d4b70">提交</u-button>
|
||||
<view style="padding: 10px 16px;display: flex;flex-direction: row;" class="bottom-button">
|
||||
<u-button text="新增" type="primary" color="#3d4b70" :plain="true" style="margin-right: 5px;" @click="handleNewCheckContent"></u-button>
|
||||
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
|
||||
</view>
|
||||
|
||||
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
|
||||
@ -85,7 +90,9 @@
|
||||
<people-selector-dep :defaultChecked="peopleSelectOption.defaultChecked" :depId="peopleSelectOption.depId" :show="peopleSelectOption.showSelector" @select="handleSelectorPeople"
|
||||
@close="peopleSelectOption.showSelector = false">
|
||||
</people-selector-dep>
|
||||
<query-selector :show="showPopupStep" :total="curTotalStep" :lists="stepLists" :defaultValue="currentOperateStep.NAME" @close="handleClosePopupStep" @search="handleSearchStep" @select="handleSelectedStep" />
|
||||
<!-- <query-selector :show="showPopupStep" :total="curTotalStep" :lists="stepLists" :defaultValue="currentOperateStep.NAME" @close="handleClosePopupStep" @search="handleSearchStep" @select="handleSelectedStep" /> -->
|
||||
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
|
||||
@search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -116,6 +123,7 @@
|
||||
} from '../../../../services/apply/subPages/SK/SKServices.js'
|
||||
import {
|
||||
getRequest,
|
||||
getRequestOrderPage
|
||||
} from '../../../../services/apply/FOServices/FOServices';
|
||||
import stepTitle from '@/components/custom/step-title.vue'
|
||||
import swipeActionItem from '../../../../uni_modules/uview-ui/libs/config/props/swipeActionItem';
|
||||
@ -135,6 +143,19 @@
|
||||
showPopupStep: false,
|
||||
stepLists: [],
|
||||
curTotalStep: 0,
|
||||
selectorInfo: {
|
||||
name: 'user',
|
||||
isMultiple: false,
|
||||
showPopup: false,
|
||||
totalCount: 0,
|
||||
title: '考核结果选择',
|
||||
dataItem: {},
|
||||
index: 0,
|
||||
columns: [],
|
||||
dataLists: [],
|
||||
defaultText: '',
|
||||
defaultChecked: []
|
||||
},
|
||||
dataModel: {
|
||||
YEAR: '',
|
||||
START_DATE: '',
|
||||
@ -212,6 +233,10 @@
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "")
|
||||
extendRule(json, 'ID', 1, this.ID);
|
||||
extendInclude(json, 'Nav_Requires');
|
||||
extendInclude(json, 'Nav_Requires.Nav_Require');
|
||||
extendInclude(json, 'Nav_Evaluations');
|
||||
extendInclude(json, 'Nav_Evaluations.Nav_Evaluation');
|
||||
extendInclude(json, 'Nav_Files.Nav_ImgFile');
|
||||
extendInclude(json, 'Nav_Details');
|
||||
extendInclude(json, 'Nav_Details.Nav_Department');
|
||||
@ -221,24 +246,45 @@
|
||||
EvaluationPlanGet(json).then(res => {
|
||||
this.dataModel = res;
|
||||
this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 20 ? 1 : 2
|
||||
this.dataModel.START_DATE = uni.$u.timeFormat(res.START_DATE, 'yyyy-mm-dd'),
|
||||
this.dataModel.END_DATE = uni.$u.timeFormat(res.END_DATE, 'yyyy-mm-dd'),
|
||||
this.dataModel.EVALUATION_END_DATE = uni.$u.timeFormat(res.EVALUATION_END_DATE, 'yyyy-mm-dd'),
|
||||
this.dataModel.Nav_Details.map((item, index) => {
|
||||
let arr = item.Nav_DetailUsers.map((item1, index1) => {
|
||||
if (!item1.Nav_User.IS_DELETED) {
|
||||
return ' ' + item1.Nav_User.NAME
|
||||
}
|
||||
|
||||
})
|
||||
item['userlist'] = String(arr)
|
||||
this.dataModel.START_DATE = uni.$u.timeFormat(res.START_DATE, 'yyyy-mm-dd')
|
||||
this.dataModel.END_DATE = uni.$u.timeFormat(res.END_DATE, 'yyyy-mm-dd')
|
||||
this.dataModel.EVALUATION_END_DATE = uni.$u.timeFormat(res.EVALUATION_END_DATE, 'yyyy-mm-dd')
|
||||
let Nav_RequiresName = ''
|
||||
if (this.dataModel.Nav_Requires && this.dataModel.Nav_Requires.length > 0) {
|
||||
this.dataModel.Nav_Requires.map(item => {
|
||||
if (item.Nav_Require.NAME !== null) {
|
||||
Nav_RequiresName += item.Nav_Require.NAME + ' ';
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dataModel.Nav_RequiresName = Nav_RequiresName
|
||||
let Nav_EvaluationsName = ''
|
||||
if (this.dataModel.Nav_Evaluations && this.dataModel.Nav_Evaluations.length > 0) {
|
||||
this.dataModel.Nav_Evaluations.map(item => {
|
||||
if (item.Nav_Evaluation.NAME !== null) {
|
||||
Nav_EvaluationsName += item.Nav_Evaluation.NAME + ' ';
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dataModel.Nav_EvaluationsName = Nav_EvaluationsName
|
||||
this.dataModel.Nav_Details.map((item, index) => {
|
||||
let arr = item.Nav_DetailUsers.map((item1, index1) => {
|
||||
if (!item1.Nav_User.IS_DELETED) {
|
||||
return ' ' + item1.Nav_User.NAME
|
||||
}
|
||||
|
||||
})
|
||||
item['userlist'] = String(arr)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
handleNewCheckContent() {
|
||||
this.dataModel.Nav_Details.unshift({
|
||||
IS_DELETED: false,
|
||||
ID:guid(),
|
||||
IDENTIFY_EVALUATION_PLAN_ID:this.ID,
|
||||
Nav_Department: {
|
||||
NAME: ''
|
||||
},
|
||||
@ -251,19 +297,9 @@
|
||||
|
||||
this.dataModel.Nav_Details = [...this.dataModel.Nav_Details]
|
||||
},
|
||||
handleDelRowBefore(index) {
|
||||
this.showDelModalIndex = index
|
||||
this.nowIndex = index
|
||||
|
||||
|
||||
},
|
||||
confirmDel() {
|
||||
this.dataModel.Nav_Details.splice(this.nowIndex, 1)
|
||||
this.showDelModalIndex = undefined
|
||||
|
||||
},
|
||||
cacelDel() {
|
||||
this.showDelModalIndex = undefined
|
||||
handleDelRowBefore(item) {
|
||||
item.IS_DELETED = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
cancelRecitifyDate() {
|
||||
this.showPopupRecitifyDate = false
|
||||
@ -371,6 +407,144 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
async handleShowSheet(p) {
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "", 0, p.pageIndex ?? 1)
|
||||
let dataSelect = []
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
var defaultChecked = []
|
||||
this.selectorInfo.isMultiple = false
|
||||
if (p.val) {
|
||||
extendRule(json, 'NAME', 9, p.val);
|
||||
}
|
||||
json.Limit = 20
|
||||
if (p.pageIndex) {
|
||||
json.Start = (p.pageIndex - 1) * json.Limit;
|
||||
}
|
||||
json.Sort = "NAME"
|
||||
json.SelectField = ["ID", "NAME", "NAME"]
|
||||
if (p.name == "Nav_Requires") {
|
||||
this.selectorInfo.isMultiple = true
|
||||
dataSelect = await getRequestOrderPage(json, "/SK/Request/OrderPaged").then(res => {
|
||||
this.selectorInfo.totalCount = res.TotalCount
|
||||
if (res.Data != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
res[i].name = res.Data[i].NAME
|
||||
res[i].code = res.Data[i].CODE
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
if (this.dataModel.Nav_Requires && this.dataModel.Nav_Requires.length > 0) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.dataModel.Nav_Requires.filter(i => !i.IS_DELETED).forEach(e => {
|
||||
if (e.Nav_Require != null && e.Nav_Require.NAME != null)
|
||||
defaultChecked.push(e.Nav_Require)
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
} else if (p.name == "Nav_Evaluations") {
|
||||
this.selectorInfo.isMultiple = true
|
||||
dataSelect = await getRequestOrderPage(json, "/SK/Evaluation/OrderPaged").then(res => {
|
||||
if (res.Data != undefined && res.Data.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
res[i].name = res.Data[i].NAME
|
||||
res[i].code = res.Data[i].CODE
|
||||
}
|
||||
}
|
||||
return res.Data
|
||||
})
|
||||
if (this.dataModel.Nav_Evaluations && this.dataModel.Nav_Evaluations.length > 0) {
|
||||
// this.selectorInfo.defaultChecked = []
|
||||
this.dataModel.Nav_Evaluations.filter(i => !i.IS_DELETED).forEach(e => {
|
||||
if (e.Nav_Evaluation != null && e.Nav_Evaluation.NAME != null)
|
||||
defaultChecked.push(e.Nav_Evaluation)
|
||||
})
|
||||
} else {
|
||||
defaultChecked = null
|
||||
}
|
||||
}
|
||||
if (defaultChecked == null)
|
||||
defaultChecked = []
|
||||
if (dataSelect.length) {
|
||||
this.selectorInfo = {
|
||||
itemData: p.itemData != undefined ? p.itemData : this.selectorInfo
|
||||
.itemData, //itemData: p.itemData, 搜索的时候 p.itemData为空 赋值修改 为 她自己本身 this.selectorInfo.itemData
|
||||
isMultiple: this.selectorInfo.isMultiple,
|
||||
totalCount: this.selectorInfo.totalCount,
|
||||
showPopup: true,
|
||||
title: p.title,
|
||||
name: p.name,
|
||||
dataLists: dataSelect,
|
||||
defaultChecked: defaultChecked
|
||||
}
|
||||
} else {
|
||||
// 暂无数据
|
||||
}
|
||||
},
|
||||
//数据加载
|
||||
handleSearch(val, pageIndex) {
|
||||
var p = {
|
||||
name: this.selectorInfo.name,
|
||||
title: this.selectorInfo.title,
|
||||
val: val,
|
||||
pageIndex: pageIndex,
|
||||
index: this.selectorInfo.index
|
||||
}
|
||||
this.handleShowSheet(p)
|
||||
},
|
||||
|
||||
handleSelected(e) {
|
||||
this.selectorInfo.showPopup = false
|
||||
if (this.selectorInfo.name == 'Nav_Requires') {
|
||||
let listArea = []
|
||||
let areaShow = ''
|
||||
if (e.length > 0) {
|
||||
e.forEach((item, i) => {
|
||||
if (item.name != null || item.NAME != null) {
|
||||
if (i > 0) {
|
||||
areaShow += ' '
|
||||
}
|
||||
listArea.push({
|
||||
ID: guid(),
|
||||
IDENTIFY_EVALUATION_PLAN_ID: this.ID,
|
||||
REQUIRE_ID: item.ID,
|
||||
ORG_ID: item.ORG_ID,
|
||||
Nav_Require: item
|
||||
})
|
||||
areaShow += item.NAME
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dataModel.Nav_Requires = listArea
|
||||
this.dataModel.Nav_RequiresName = areaShow
|
||||
} else if (this.selectorInfo.name == 'Nav_Evaluations') {
|
||||
let listArea = []
|
||||
let areaShow = ''
|
||||
if (e.length > 0) {
|
||||
e.forEach((item, i) => {
|
||||
if (item.name != null || item.NAME != null) {
|
||||
if (i > 0) {
|
||||
areaShow += ' '
|
||||
}
|
||||
listArea.push({
|
||||
ID: guid(),
|
||||
IDENTIFY_EVALUATION_PLAN_ID: this.ID,
|
||||
EVALUATION_ID: item.ID,
|
||||
ORG_ID: item.ORG_ID,
|
||||
Nav_Evaluation: item
|
||||
})
|
||||
areaShow += item.NAME
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dataModel.Nav_Evaluations = listArea
|
||||
this.dataModel.Nav_EvaluationsName = areaShow
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
submit() {
|
||||
if (!this.dataModel.CONTENTS) {
|
||||
@ -396,16 +570,11 @@
|
||||
return
|
||||
}
|
||||
}
|
||||
let arr = ['DEPARTMENT_ID', 'ENTITY_ORG_TPYE', 'Nav_DetailUsers', 'ID', 'IDENTIFY_EVALUATION_PLAN_ID', 'ORG_ID']
|
||||
this.model = {
|
||||
YEAR: this.dataModel.YEAR,
|
||||
START_DATE: this.dataModel.START_DATE,
|
||||
END_DATE: this.dataModel.END_DATE,
|
||||
EVALUATION_END_DATE: this.dataModel.EVALUATION_END_DATE,
|
||||
CONTENTS: this.dataModel.CONTENTS,
|
||||
ORG_ID: this.ORG_ID,
|
||||
Nav_Files: this.dataModel.Nav_Files,
|
||||
Nav_Details: handleOriginalArray(this.dataModel.Nav_Details, arr)
|
||||
this.model = this.dataModel
|
||||
if(this.model.Nav_Details&&this.model.Nav_Details.length>0){
|
||||
this.model.Nav_Details.map(item=>{
|
||||
delete item.Nav_Department
|
||||
})
|
||||
}
|
||||
this.model.ID = this.ID
|
||||
this.model.TaskID = this.TaskID
|
||||
|
||||
Loading…
Reference in New Issue
Block a user