Merge remote-tracking branch 'origin/feature1.2' into dev

dev
kongyeqing 2023-09-07 09:28:12 +08:00
commit c6a2560f84
38 changed files with 522 additions and 373 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -109,6 +109,7 @@ import { L_COLUMN, L_VALUE, S_COLUMN, S_VALUE } from '@/mock/lsRisk';
import { L_LECCOLUMN, L_LECVALUE, E_COLUMN, E_VALUE, C_COLUMN, C_VALUE } from '@/mock/lecRisk';
import MeasureComponent from '@/components/measure.component.vue'
import moment from 'moment';
import { Message } from 'element-ui';
@Component({
components: {
@ -1110,6 +1111,8 @@ export default class AnalEvaluationComponent extends Vue {
if (data.value === "cancel") {
this.visible = false;
} else if (data.value === "store") {
let vaildParams = true
if ((this.$refs.basicForm as any).vaildParams() === false) {
//
@ -1124,6 +1127,12 @@ export default class AnalEvaluationComponent extends Vue {
vaildParams = false
}
if (vaildParams === true) {
console.log('this.analysisUpdateParams', this.analysisUpdateParams);
if (this.analysisUpdateParams.measures.length === 0) {
this.$message.warning('请添加管控措施!')
return
}
const tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams))
// this.analysisUpdateParams.measures = this.currentMeasureData.datas
//
@ -1153,7 +1162,7 @@ export default class AnalEvaluationComponent extends Vue {
}
}
//
public collationAnalysisDataMethod() {
this.analysisUpdateParams.measuresNum = this.analysisUpdateParams.measures.length;
this.analysisUpdateParams.seriousResult = this.analysisUpdateParams.seriousResult.join(",");

View File

@ -11,7 +11,7 @@
<div class="update-box">
<div class="form-box">
<FormComponent v-if="viewModel!=='list'" labelWidth="56px" :isReadonly="isReadonly" :fullBtn="true" :btnPosition="'center'" @change="change" :data.sync="updateParams" @actionCallback="callback" :options="options" :actions="actions"></FormComponent>
<FormComponent v-else labelWidth="56px" @change="change" :data.sync="listParams" :options="listForm" ></FormComponent>
<FormComponent v-else labelWidth="56px" @input="change" :data.sync="listParams" :options="listForm" ></FormComponent>
</div>
<div class="tree-box" v-if="viewModel==='list'">
<el-tree :data="treeData" :props="{children:'children',label:'name'}" :expand-on-click-node="false" default-expand-all highlight-current

View File

@ -18,7 +18,7 @@ export default class MapComponent extends Vue {
@PropSync("position",{
required:false,
default:()=>{
return [118.751353,31.969568]
return [119.592977,34.523847]
}
})
center:number[]

View File

@ -34,8 +34,8 @@
<el-dialog :close-on-click-modal="false" :title="taskIsReadonly ? '详情' : taskUpdataParams.index ? '编辑' : '新增'"
:visible.sync="showSubUpdate" width="952px" :before-close="handleCloseTask">
<FormComponent :options="taskUpdateOptions" :isReadonly="taskIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="taskUpdataParams" :actions="subActions" :full-btn="true" btnPosition="center"
@actionCallback="taskCallback" @change="taskSelectChange">
:data.sync="taskUpdataParams" :actions="taskIsReadonly ? [] : taskActions" :full-btn="true"
btnPosition="center" @actionCallback="taskCallback" @change="taskSelectChange">
</FormComponent>
</el-dialog>
</div>
@ -231,6 +231,7 @@ export default class MeasureComponent extends Vue {
width: "calc(50% - 20px)",
require: true,
showError: false,
min: 1,
// labelWidth:"130px"
}, {
key: "reviewCycleUnit",
@ -274,19 +275,26 @@ export default class MeasureComponent extends Vue {
showError: false,
},]
}
public subActions = [] as any;
//
public taskActions = [] as any;
public buildTaskAction(){
this.taskActions= [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
hide: this.taskUpdataParams.index
}, {
name: "保存",
value: "save",
type: "primary"
}];
}
public subActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary"
}, {
name: "保存",
value: "save",
type: "primary"
}];
public tableActions = [{
name: "添加",
value: "fourSubAdd",
@ -328,6 +336,7 @@ export default class MeasureComponent extends Vue {
// }
this.measuresUpdateForm()
this.taskUpdateForm()
this.buildActions()
}
@PropSync("tabledata", {
@ -335,9 +344,26 @@ export default class MeasureComponent extends Vue {
})
public measureData!: any;
public buildActions() {
this.subActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
hide: this.updataParams.index
}, {
name: "保存",
value: "save",
type: "primary"
}];
}
created() {
this.buildTable();
console.log('measureData',this.measureData);
console.log('measureData', this.measureData);
}
@ -442,6 +468,7 @@ export default class MeasureComponent extends Vue {
}
this.showSubUpdate = true
this.taskUpdateForm()
this.buildTaskAction()
}
// ---
@ -501,6 +528,7 @@ export default class MeasureComponent extends Vue {
}
this.taskUpdateForm();
this.showSubUpdate = true;
this.buildTaskAction()
}
public deleteTask(row) {

1
src/global.d.ts vendored
View File

@ -2,4 +2,5 @@
declare module 'common/notFound';
declare module 'common/index';
declare module 'common/layout';
declare module 'common/login';
declare module 'file-saver'

View File

@ -2,6 +2,7 @@ import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
import pageNoFoundComponent from 'common/notFound'
import indexComponent from 'common/index'
import LoginComponent from 'common/login'
import LayoutComponent from "common/layout"
import HomeComponent from '@/views/home/home.component.vue'
import BlankComponent from "@/views/blank.component.vue"
@ -316,6 +317,11 @@ const routes: Array<RouteConfig> = [
name: 'index',
component:indexComponent
},
{
path: '/login',
name: 'login',
component:LoginComponent
},
{
path: '*',
name: '404',

View File

@ -8,7 +8,7 @@ export default class EmergencyCardService extends BaseService<any>{
// 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/card/handle/getList';
return this.post(url,params)
return this.get(url,params,true)
}
// 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -43,4 +43,10 @@ export default class ProgrammeService extends BaseService<any>{
const url = this.prefix.file+'/getSysFiles';
return this.get(url,params,false)
}
//获取适用年度
public getSuitListData(params:any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/process/plan/suitList';
return this.get(url,params)
}
}

View File

@ -8,7 +8,7 @@ export default class RewardsRecordService extends BaseService<any>{
// 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/incentive/record/getList';
return this.post(url,params)
return this.get(url,params,true)
}
// 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -8,7 +8,7 @@ export default class RiskCardService extends BaseService<any>{
// 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/card/notify/getList';
return this.post(url,params)
return this.get(url,params,true)
}
// 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -8,7 +8,7 @@ export default class SafeCardService extends BaseService<any>{
// 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/card/promise/getList';
return this.post(url,params)
return this.get(url,params,true)
}
// 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -36,6 +36,12 @@ export default class UnitService extends BaseService<any>{
return this.post(url,params,{},showLoading)
}
//获取单元详情
public getUnitDetail(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/risk/unit/repairList';
return this.get(url,params)
}
// 新增或更新
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -7,7 +7,7 @@ export default class WorkService extends BaseService<any>{
}
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/job/inventory/getList';
return this.post(url,params,{},true)
return this.get(url,params,true)
}
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/job/inventory';

View File

@ -195,7 +195,7 @@
color: #F56C6C;
margin-left: -43px;
margin-bottom: 20px;
margin-top: -20px;
margin-top: -10px;
font-size: 20px;
scale:0.5;
}

View File

@ -697,7 +697,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
}
}
});
this.tableColumn.push({ name: '当前执行人', width: "100", key: "executor", render: (data) => data.executor || "--" });
this.tableColumn.push({ name: '当前执行人', width: "100", key: "executor", render: (data) => data.taskInfo.executor || "--" });
this.tableColumn.push({ name: '最新提交时间', width: "180", key: "updateTime", sortable: 'custom' });
this.tableColumn.push({ name: '隐患来源', width: "150", render: (data) => this.$store.getters.prevention_danger_resource_map[data.source] });
this.tableColumn.push({ name: '上报人', width: "100", key: "reportUserName", render: (data) => data.reportUserName || "--" });
@ -883,6 +883,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
pageSize: 20,
bpmSchemeCode: "prevention-yhzl"
} as any;
this.getTableData()
}

View File

@ -1,12 +1,12 @@
<div class="common-box dis-flex " >
<div class="common-box dis-flex ">
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
:full-btn="false" @change="change" btn-position="end"></FormComponent>
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn"
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" @pageSizeChange="callback($event,'pageSize')"
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @actionCallback="callback($event)"
@pageNumberChange="callback($event,'pageNum')" @pageSizeChange="callback($event,'pageSize')"
:footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" tooltip-effect="dark" height="100%" border
@ -19,18 +19,20 @@
</template>
</el-table-column>
<template v-for="item in tableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :filters="item.filters"
:filter-method="item.filterMethod" :label="item.name" :width="item.width" :key="item.key">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip"
:filters="item.filters" :filter-method="item.filterMethod" :label="item.name"
:width="item.width" :key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
</el-table-column>
<el-table-column v-else :prop="item.key" :filters="item.filters"
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width" :key="item.key">
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
</el-table-column>
</template>
<el-table-column label="操作" fixed="right" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" @click="showUpdateModel(scope.row)">修改</el-button>
<el-button type="text" @click="showUpdateModel(scope.row)">修改</el-button>
<el-button type="text" @click="deleteData([scope.row.id])">删除</el-button>
</template>
</el-table-column>
@ -40,75 +42,76 @@
</div>
</div>
<el-dialog :close-on-click-modal="false" :title="currentId===-1?'新增':isReadonly?'详情':'编辑'" :visible.sync="showUpdate" width="952px"
:before-close="handleClose" destroy-on-close>
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
@actionCallback="callback" :actions="updateActions" :full-btn="true" @change="change"
btn-position="center">
<el-dialog :close-on-click-modal="false" :title="currentId===-1?'新增':isReadonly?'详情':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right"
:data.sync="updateParams" @actionCallback="callback" :actions="updateActions" :full-btn="true"
@change="change" btn-position="center" ref="checkForm">
<div class="sub-title" v-if="isManager">检查项目</div>
<TableComponent v-if="isManager" :tableData="updateTableData" :tableColumn="updateTableColumn"
@actionCallback="subCallback($event)" actionPosition="flex-start" :actions="!isReadonly?updateTableActions:[]"
:showFooter="false" style="margin-bottom: 20px;">
<TableComponent v-if="isManager" :tableData="updateTableData" :tableColumn="updateTableColumn"
@actionCallback="subCallback($event)" actionPosition="flex-start"
:actions="!isReadonly?updateTableActions:[]" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="updateParams.tableItems" tooltip-effect="dark" height="100%" border
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
<el-table-column type="selection" fixed label="全选" width="40" v-if="!isReadonly">
<el-table-column type="selection" fixed label="全选" width="40" v-if="!isReadonly">
</el-table-column>
<template v-for="item in updateTableColumn">
<el-table-column v-if="item.render" :filters="item.filters"
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width" :key="item.key">
<el-table-column v-if="item.render" :filters="item.filters" :filter-method="item.filterMethod"
:show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width"
:key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
</el-table-column>
<el-table-column v-else :prop="item.key" :filters="item.filters"
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width" :key="item.key">
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
</el-table-column>
</template>
<el-table-column label="操作" fixed="right" width="200" v-if="!isReadonly">
<template slot-scope="scope">
<el-button type="text" @click="showSubUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" @click="showSubUpdateModel(scope.row)">修改</el-button>
<el-button type="text" @click="showSubUpdateModel(scope.row)">修改</el-button>
<el-button type="text" @click="doSubDelete([scope.$index])">删除</el-button>
</template>
</el-table-column>
</el-table>
</TableComponent>
</FormComponent>
</el-dialog>
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="!subUpdateParams.id?'新增':subIsReadonly?'详情':'编辑'" :visible.sync="showSubUpdate"
:before-close="handleClose">
<FormComponent :options="subUpdateOptions" :isReadonly="subIsReadonly" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
@actionCallback="subCallback" :actions="updateActions" :full-btn="true" @change="subChange"
btn-position="center">
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="!subUpdateParams.id?'新增':subIsReadonly?'详情':'编辑'"
:visible.sync="showSubUpdate" :before-close="handleClose">
<FormComponent :options="subUpdateOptions" :isReadonly="subIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="subUpdateParams" @actionCallback="subCallback" :actions="updateActions" :full-btn="true"
@change="subChange" btn-position="center">
</FormComponent>
</el-dialog>
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="'批量添加'" :visible.sync="showSubMutilUpdate"
:before-close="handleClose" destroy-on-close>
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="'批量添加'" :visible.sync="showSubMutilUpdate"
:before-close="handleClose" destroy-on-close>
<FormComponent :options="mutilAddOptions" @change="loadRuleTable" :data.sync="ruleParams"></FormComponent>
<TableComponent :tableData="updateTableData" :tableColumn="updateTableColumn" @pageNumberChange="loadRuleTable($event,'pageNum')" @pageSizeChange="loadRuleTable($event,'pageSize')"
:showFooter="true">
<TableComponent :tableData="updateTableData" :tableColumn="updateTableColumn"
@pageNumberChange="loadRuleTable($event,'pageNum')" @pageSizeChange="loadRuleTable($event,'pageSize')"
:showFooter="true">
<el-table ref="multipleTable" :data="updateTableData.datas" tooltip-effect="dark" height="100%" border
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
<el-table-column type="selection" fixed label="全选" width="40px" >
<el-table ref="multipleTable" :data="updateTableData.datas" tooltip-effect="dark" height="100%" border
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
<el-table-column type="selection" fixed label="全选" width="40px">
</el-table-column>
<template v-for="item in updateTableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
</el-table-column>
<template v-for="item in updateTableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width" :key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
</el-table-column>
<el-table-column v-else :prop="item.key" :show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width" :key="item.key">
</el-table-column>
</template>
</el-table>
</TableComponent>
<div class="dis-flex" style="justify-content: center; margin-top: 20px;">
<el-button @click="cancelMutilAdd"> 取消</el-button>
<el-button type="primary" @click="doMutilAdd"> 确定</el-button>
</div>
<el-table-column v-else :prop="item.key" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
</el-table-column>
</template>
</el-table>
</TableComponent>
<div class="dis-flex" style="justify-content: center; margin-top: 20px;">
<el-button @click="cancelMutilAdd"> 取消</el-button>
<el-button type="primary" @click="doMutilAdd"> 确定</el-button>
</div>
</el-dialog>
</div>

View File

@ -12,7 +12,7 @@ import RuleService from '@/service/rule.service';
import { number } from 'echarts';
@Component({
template,
components:{
components: {
FormComponent,
TableComponent,
DrawComponent,
@ -28,45 +28,45 @@ export default class RulesComponent extends BaseRecordComponent<any> {
public isManager = false;
public formActions = [{
name:"查询",
value:"search",
icon:"el-icon-search",
type:"primary"
},{
name:"清空",
icon:"el-icon-tickets",
value:"reset"
name: "查询",
value: "search",
icon: "el-icon-search",
type: "primary"
}, {
name: "清空",
icon: "el-icon-tickets",
value: "reset"
}];
public tableActions = [{
name:"添加",
value:"add",
icon:"el-icon-plus",
type:"primary"
},{
name:"批量删除",
value:"delete",
plain:true,
icon:"el-icon-delete",
type:"danger"
name: "添加",
value: "add",
icon: "el-icon-plus",
type: "primary"
}, {
name: "批量删除",
value: "delete",
plain: true,
icon: "el-icon-delete",
type: "danger"
}];
public footerActions = [{
name:"选择全部",
value:"selectAll",
type:"primary"
},{
name:"反向选择",
value:"reverse"
name: "选择全部",
value: "selectAll",
type: "primary"
}, {
name: "反向选择",
value: "reverse"
}];
public formOptions:FormOption<BtnOption>[] = [{
name:"检查项目",
key:"name",
type:"text",
public formOptions: FormOption<BtnOption>[] = [{
name: "检查项目",
key: "name",
type: "text",
}];
public showUpdate = false;
public currentId = -1;
public updateParams = {} as any;
public updateOptions:FormOption<BtnOption>[] = [];
public updateParams = {} as any;
public updateOptions: FormOption<BtnOption>[] = [];
public showDraw = false;
@ -74,159 +74,176 @@ export default class RulesComponent extends BaseRecordComponent<any> {
public drawModel = "list";
public updateActions = [{
name:"取消",
value:"cancel"
},{
name:"保存并继续添加",
value:"saveAndContinue",
type:"primary"
},{
name:"保存",
value:"save",
type:"primary"
}];
public updateActions = [] as any;
public selectData = [];
created(){
created() {
}
public getTableCallback(){
public getTableCallback() {
this.updateOptions = [{
name:"检查标准编号",
key:"number",
type:"text",
width:"calc(50% - 20px)",
require:true,
showError:false,
disable:true,
},{
name:"检查项目",
key:"name",
type:"text",
width:"calc(50% - 20px)",
require:true,
showError:false,
},{
name:"检查内容",
key:"content",
type:"textarea",
width:"100%",
require:true,
showError:false,
},{
name:"检查依据",
key:"reason",
type:"textarea",
width:"100%",
require:true,
showError:false,
},{
name:"类型",
key:"type",
format:"typeName",
type:"select",
width:"100%",
require:true,
datas:this.$store.state.prevention_dangrous_type
name: "检查标准编号",
key: "number",
type: "text",
width: "calc(50% - 20px)",
require: true,
showError: false,
disable: true,
}, {
name: "检查项目",
key: "name",
type: "text",
width: "calc(50% - 20px)",
require: true,
showError: false,
}, {
name: "检查内容",
key: "content",
type: "textarea",
width: "100%",
require: true,
showError: false,
}, {
name: "检查依据",
key: "reason",
type: "textarea",
width: "100%",
require: true,
showError: false,
}, {
name: "类型",
key: "type",
format: "typeName",
type: "select",
width: "100%",
require: true,
multiple: true,
showError: false,
datas: this.$store.state.prevention_dangrous_type
}]
this.updateActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
hide: this.updateParams.id
}, {
name: "保存",
value: "save",
type: "primary"
}]
}
public buildTable(){
this.tableColumn.push({name:'检查项目',key:"name"});
this.tableColumn.push({name:'检查内容',key:"content",showTip:true});
this.tableColumn.push({name:'检查依据',key:"reason",showTip:true});
this.tableColumn.push({name:'分类',key:"type",render:(data)=>{
return this.$store.getters.prevention_dangrous_type_map[data.type]
}});
public buildTable() {
this.tableColumn.push({ name: '检查项目', key: "name" });
this.tableColumn.push({ name: '检查内容', key: "content", showTip: true });
this.tableColumn.push({ name: '检查依据', key: "reason", showTip: true });
this.tableColumn.push({
name: '分类', key: "type", render: (data) => {
return data.type.split(',').map(item => {
return this.$store.getters.prevention_dangrous_type_map[item]
}).join(",")
}
});
}
public change(data,item){
public change(data, item) {
//
}
public callback(data,type?){
if(type){
public callback(data, type?) {
if (type) {
this.params[type] = data;
this.getTableData();
return
}
//
if(data && data.value==="search"){
if (data && data.value === "search") {
this.getTableData()
//
}else if(data && data.value === "reset"){
//
} else if (data && data.value === "reset") {
this.reset()
//
}else if(data && data.value === "reverse"){
//
} else if (data && data.value === "reverse") {
this.toggleAll()
//
}else if(data && data.value === "selectAll"){
//
} else if (data && data.value === "selectAll") {
this.selectAll()
}else if(data && data.value === "add"){
} else if (data && data.value === "add") {
this.showUpdateModel()
}else if(data && data.value === "delete"){
this.deleteData(this.selectData.map((item:any)=>item.id));
} else if (data && data.value === "delete") {
this.deleteData(this.selectData.map((item: any) => item.id));
this.clearSelect()
}else if(data && data.value.indexOf("save")>=0){
this.doSave(data.value!=="save")
}else{
} else if (data && data.value.indexOf("save") >= 0) {
this.doSave(data.value !== "save")
} else {
this.handleClose();
}
}
//
public reset(){
public reset() {
this.params = {
name:"",
pageNum:1,
pageSize:20,
name: "",
pageNum: 1,
pageSize: 20,
} as any;
}
public doSave(goOn?){
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res=>{
this.$message.success(this.currentId===-1?"新增成功!":"编辑成功");
/**
* 数据保存
* @param goOn
*/
public doSave(goOn?) {
this.updateParams.type = this.updateParams.type.join(',')
this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then((res => {
this.$message.success(this.currentId === -1 ? "新增成功!" : "编辑成功");
this.showUpdate = !!goOn;
this.updateParams = {number:null} as any;
if(goOn){
this.tableService.getNumber().then(res=>{
this.updateParams = { number: null } as any;
if (goOn) {
this.tableService.getNumber().then(res => {
this.updateParams.number = res.data
})
}
this.getTableData();
}))
}
public showUpdateModel(row?,isRead?){
this.updateParams = Object.assign({number:null})
public showUpdateModel(row?, isRead?) {
this.updateParams = Object.assign({ number: null })
this.isReadonly = !!isRead;
if(!row){
if (!row) {
this.currentId = -1;
this.tableService.getNumber().then(res=>{
this.tableService.getNumber().then(res => {
this.updateParams.number = res.data
})
}else{
this.updateParams = Object.assign({number:null,typeName:this.$store.getters.prevention_dangrous_type_map[row.type]},row)
} else {
this.updateParams = Object.assign({
number: null,
typeName: row.type.split(',').map(item => {
return this.$store.getters.prevention_dangrous_type_map[item]
}).join(",")
}, row)
this.updateParams.type = row.type.split(',').map((item: any) => parseInt(item))
this.currentId = row.id;
}
this.clearSelect();
this.showUpdate = true
this.getTableCallback()
this.showUpdate = true;
}
public clearSelect(){
public clearSelect() {
(this.$refs.multipleTable as any).clearSelection();
this.selectData = [];
}
public handleClose(){
public handleClose() {
this.showUpdate = false;
this.clearSelect();
}
@ -234,24 +251,24 @@ export default class RulesComponent extends BaseRecordComponent<any> {
public toggleAll() {
this.tableData.datas.forEach((item,index)=>{
this.tableData.datas.forEach((item, index) => {
(this.$refs.multipleTable as any).toggleRowSelection(item);
})
}
public selectAll(){
if(!this.selectData.length){
public selectAll() {
if (!this.selectData.length) {
this.toggleAll()
}else{
this.tableData.datas.forEach((item,index)=>{
const find = this.selectData.find((data:any)=>data.id === item.id);
if(!find){
} else {
this.tableData.datas.forEach((item, index) => {
const find = this.selectData.find((data: any) => data.id === item.id);
if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item);
}
})
}
}
public handleSelectionChange(data){
public handleSelectionChange(data) {
this.selectData = data;
}
}

View File

@ -42,6 +42,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
value:"search",
icon:"el-icon-search",
type:"primary"
}, {
name: "清空",
icon: "el-icon-tickets",
value: "reset"
}];
public tableActions = [{
@ -293,6 +297,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
}
}),filterMethod:(data,row)=>{
return row.types.indexOf(data)>=0;
}, render: (data) => {
return data.types.split(',').map(item => {
return this.$store.getters.prevention_dangrous_type_map[item]
}).join(",")
}});
this.tableColumn.push({name:'编制人',key:"createName"});
this.tableColumn.push({name:'编制时间',key:"createTime"});
@ -499,7 +507,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.$message.success(this.currentId===-1?"新增成功!":"编辑成功");
this.getTableData();
this.showUpdate = !!goOn;
this.updateParams = {areas:[],depts:[],units:[],types:[],targets:[],number:null} as any;
this.updateParams = {areas:[],depts:[],units:[],types:[],targets:[],number:null,tableItems:[]} as any;
if(!!goOn){
this.getNumber();
}
}).catch(()=>{
this.updateParams.depts = this.updateParams.depts.map(item=>item.id)

View File

@ -544,6 +544,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public getMap(map) {

View File

@ -2,7 +2,7 @@
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
:full-btn="false" @change="callback($event)" btn-position="end"></FormComponent>
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"

View File

@ -101,8 +101,14 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
datas: this.$store.state.userList
}, {
name: "岗位",
type: "select",
key: "postName",
datas: this.$store.state.postList,
width: "270px",
}, {
name: "职务",
type: "text",
key: "dutyName",
}];
public subActions = [{
@ -344,6 +350,9 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
}
//
public getTableData() {
if(this.params.postName){
this.params.postName = this.$store.state.postList.find((item: any) => item.value === this.params.postName)?.name??""
}
this.tableService.selectByPage(this.params).then(res => {
this.tableData = res.data as any;
})

View File

@ -111,7 +111,7 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
created() {
//
}
public buildFormOptions() {
@ -388,10 +388,9 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public showUpdateModel(data?, isRead?) {
if (!data) {
this.currentId = -1;
@ -399,7 +398,6 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
} else {
this.currentId = data.id;
this.updateParams = Object.assign({ bottomHeight: 0, topHeight: 0, geoJson: "[]", majorHazardFlagName: this.$store.getters.common_yes_no_map[data.majorHazardFlag], majorHazardLevelName: this.levelName(data.majorHazardLevel) }, data);
this.isReadonly = !!isRead;
this.buildFormOptions();
this.showUpdate = true

View File

@ -1,13 +1,13 @@
<div class="common-box dis-flex ">
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<FormComponent :inline="true" :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
:full-btn="false" @change="change" btn-position="end"></FormComponent>
<FormComponent :inline="true" :options="formOptions" :data.sync="params" @actionCallback="callback"
:actions="formActions" :full-btn="false" @change="callback" btn-position="end"></FormComponent>
</div>
<div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn"
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @actionCallback="callback($event)"
@pageNumberChange="callback($event,'pageNum')" @pageSizeChange="callback($event,'pageSize')"
:footerActions="footerActions" :actions="tableActions">
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border
@selection-change="handleSelectionChange" style="width: 100%">
@ -54,12 +54,9 @@
:data.sync="updateParams" @actionCallback="callback" :actions="updateActions" :full-btn="true"
@change="change" btn-position="center">
<span class="tips" v-if="isArea">*注:安全风险分析对象编码即危险化学品登记综合服务系统中的危险源编码</span>
<div class="sub-title" v-if="!isArea && isReadonly">停用/检修记录</div>
<TableComponent v-if="!isArea && isReadonly" :tableData="repairTableData" :tableColumn="repairTableColumn"
:showFooter="false" style="margin-bottom: 20px;">
:showFooter="false" style="margin-bottom: 20px;height: 200px;">
</TableComponent>
</FormComponent>

View File

@ -38,7 +38,7 @@
</div>
<el-dialog :close-on-click-modal="false" :visible.sync="showUpdate" destroy-on-close>
<img style="width:100%" src="../../../../assets/images/4.jpg" alt="">
<img style="width:100%" src="../../../../assets/images/4.png" alt="">
</el-dialog>
<!-- 选取LS值 -->
@ -91,11 +91,7 @@
<div slot-scope="scope" class="cursor td-content" :class="{active:scope.row.value===4}">
<el-radio v-model="scope.row.value" :label="4"">{{scope.row.type4}}</el-radio></div>
</el-table-column>
</el-table-column>
</el-table-column>
<el-table-column prop=" value" :label="popTitle==='L'?'Ln':'Sn'">
<div slot-scope="scope">
@ -108,44 +104,4 @@
<ButtonListComponent :actions="popBtns" @callback="popCallback" btn-position="center" :full-btn="true">
</ButtonListComponent>
</el-dialog>
<!-- 选取LS值 -->
<!-- <el-dialog :close-on-click-modal="false" :title="popTitle" :visible.sync="showPop" width="1000px" destroy-on-close>
<el-table :data="riskDatas" border style="width: 100%; margin-bottom: 20px;" :span-method="colSpan">
<el-table-column prop="index" label="序号"></el-table-column>
<el-table-column prop="name" label="项目"></el-table-column>
<el-table-column label="取值标准">
<el-table-column prop="noInvolved" label="是否涉及">
<div slot-scope="scope" class="cursor td-content" :class="{active:scope.row.value===0}"
@click="selectRow(scope.row,0)">
<span>不涉及</span>
</div>
</el-table-column>
<el-table-column prop="type1" label="1">
<div slot-scope="scope" class="cursor td-content" :class="{active:scope.row.value===1}"
@click="selectRow(scope.row,1)"><span>{{scope.row.type1}}</span></div>
</el-table-column>
<el-table-column prop="type2" label="2">
<div slot-scope="scope" class="cursor td-content" :class="{active:scope.row.value===2}"
@click="selectRow(scope.row,2)"><span>{{scope.row.type2}}</span></div>
</el-table-column>
<el-table-column prop="type3" label="3">
<div slot-scope="scope" class="cursor td-content" :class="{active:scope.row.value===3}"
@click="selectRow(scope.row,3)"><span>{{scope.row.type3}}</span></div>
</el-table-column>
<el-table-column prop="type4" label="4">
<div slot-scope="scope" class="cursor td-content" :class="{active:scope.row.value===4}"
@click="selectRow(scope.row,4)"><span>{{scope.row.type4}}</span></div>
</el-table-column>
</el-table-column>
<el-table-column prop="value" :label="popTitle==='L值取值'?'Ln':'Sn'">
<div slot-scope="scope">
<span v-if="scope.row.value">{{scope.row.value}}</span>
<span v-else></span>
</div>
</el-table-column>
<el-table-column prop="result" :label="popTitle==='L值取值'?'L':'S'"></el-table-column>
</el-table>
<ButtonListComponent :actions="popBtns" @callback="popCallback" btn-position="center" :full-btn="true">
</ButtonListComponent>
</el-dialog> -->
</div>

View File

@ -95,7 +95,7 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
});
this.tableColumn.push({
name: '区域固有风险', render: (data) => {
return "<span class='color_level_" + data.analRiskLevel + "'>" + (data.analRiskLevel ? (this.$store.getters.prevention_risk_level_map[data.analRiskLevel] + this.numberForMat[data.analRiskLevel]) : '') + "</span>"
return "<span class='color_level_" + data.analRiskLevel + "'>" + (data.analRiskLevel ? (this.$store.getters.prevention_risk_level_map[data.analRiskLevel] + this.numberForMat[data.analRiskLevel]) : '待评估') + "</span>"
}
});
this.tableColumn.push({
@ -144,11 +144,18 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
this.showUpdate = true
}
// L/S
public addVal(el, row) {
/**
* 新增 添加L/S值
* @param el
* @param row 当前行数据
*/
public addVal(el: any, row: any) {
this.riskLDatas = [];
this.riskSDatas = [];
this.currentRow = row;
this.cacheCurrentRow = JSON.parse(JSON.stringify(row));
this.riskLDatas = riskLData;
this.riskLDatas = JSON.parse(JSON.stringify(riskLData));
this.riskSDatas = JSON.parse(JSON.stringify(riskSData));
this.popTitle = 'L';
const lData = JSON.parse(row.analLikelihoodContent || "[]");
const sData = JSON.parse(row.analSeverityContent || "[]");
@ -222,7 +229,30 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
}
if (row[column.property] !== '/') {
row.value = column.index - 1
this.countEstimateValue()
}
}
public countEstimateValue() {
let value: number = 0;
let len: number = 0;
let tmpRiskDatas = []
if (this.popTitle === 'L') {
tmpRiskDatas = this.riskLDatas
}
if (this.popTitle === 'S') {
tmpRiskDatas = this.riskSDatas
}
tmpRiskDatas.forEach((item: any) => {
if (item.value && typeof (item.value) === 'number') {
len = len + 1
value = value + item.value
}
})
tmpRiskDatas.forEach((item: any) => {
item.result = Math.round(value / len).toString()
})
}
public startEdit(row) {
@ -274,7 +304,9 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
this.popTitle = 'S';
this.stepsActive = 2;
this.riskLDatas[0].value = value;
this.riskSDatas = JSON.parse(JSON.stringify(riskSData));
if (this.riskSDatas.length === 0) {
this.riskSDatas = JSON.parse(JSON.stringify(riskSData));
}
this.updateBtn();
} else {
this.currentRow.analSeverityContent = content;
@ -304,7 +336,7 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
//
public selectRadioData(data) {
console.log('data', data);
// console.log('data', data);
}
//L

View File

@ -159,7 +159,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
public buildUpdateForm() {
this.updateOptions = [{
name: "区域名称",
name: "选择区域",
key: "areaId",
format: "areaName",
type: "select",
@ -169,7 +169,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
datas: this.areaList,
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
}, {
name: "单元名称",
name: "选择单元",
key: "unitId",
format: "unitName",
type: "select",
@ -236,7 +236,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
width: "calc(50% - 20px)",
require: true,
showError: false,
format: "yyyy-MM-dd"
format: "yyyy-MM-dd",
disable: true,
}, {
name: "区域固有风险等级",
key: "analRiskLevel",

View File

@ -120,7 +120,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
hide:this.updateParams.id
hide: this.updateParams.id
}, {
name: "保存",
value: "save",
@ -137,7 +137,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
hide:this.stepUpdateParams.index
hide: this.stepUpdateParams.index
}, {
name: "保存",
value: "save",
@ -470,6 +470,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
}
this.showSubUpdate = true;
this.subUpdateActionsForm();
this.buildUpdateForm();
}
public doSubDelete(indexs) {
@ -486,6 +487,10 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
public doSave(goOn?) {
if (this.updateParams.steps.length === 0) {
this.$message.warning("请您至少添加一条作业步骤!");
return
}
//
if (this.showSubUpdate) {
//
@ -598,7 +603,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
this.toggleAll()
} else {
this.tableData.datas.forEach((item, index) => {
const find = this.selectData.find((data: any) => data.userId === item.userId);
const find = this.selectData.find((data: any) => data.id === item.id);
if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item);
}

View File

@ -131,7 +131,11 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
name: "单元名称",
key: "unitName",
type: "text",
},];
}, {
name: "作业活动",
key: "jobInventoryName",
type: "text",
}];
public showUpdate = false;
@ -165,7 +169,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
console.log(this.updateParams.id && this.updateParams.status !== 1,);
this.updateOptions = [{
name: "区域名称",
name: "选择区域",
key: "areaId",
format: "areaName",
type: "select",
@ -175,7 +179,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
datas: this.areaList,
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
}, {
name: "单元名称",
name: "选择单元",
key: "unitId",
format: "unitName",
type: "select",
@ -240,7 +244,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
require: true,
showError: false,
format: "yyyy-MM-dd"
format: "yyyy-MM-dd",
disable:true,
}, {
name: "区域固有风险等级",
key: "analRiskLevel",
@ -502,7 +507,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
this.subTableColumn.push({ name: '步骤名称', key: "name" });
this.subTableColumn.push({ name: '作业步骤描述', key: "description", showTip: true, width: "200px" });
this.subTableColumn.push({ name: '作业地点', key: "location" }); this.subTableColumn.push({ name: '风险源', key: "riskSource" });
this.subTableColumn.push({ name: '危害分析', key: "hazardAnalysis", width: "200px" });
this.subTableColumn.push({ name: '危害分析', key: "hazardAnalysis", width: "200px", showTip: true, });
this.subTableColumn.push({
name: '最严重后果', key: "seriousResult", width: "100px", render: (data) => {
if (data.seriousResult) {
@ -647,6 +652,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
//

View File

@ -379,9 +379,10 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
this.repairTableColumn.push({ name: "登记时间", key: "registerTime" });
}
public getAreaList() {
this.areaService.selectByPage({ pageSize: 10 }).then((res: any) => {
this.areaList = res.data.datas.map(item => {
public getAreaList(){
this.areaService.selectByPage({pageSize:1000}).then((res:any)=>{
this.areaList = res.data.datas.map(item=>{
this.areaNoMap[item.id] = item.number;
return {
name: item.name,

View File

@ -63,7 +63,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
public showFileList = [] as any;
public labelWidth='130px'
public labelWidth = '130px'
public formActions = [{
name: "查询",
@ -138,7 +138,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
width: "calc(50% - 20px)",
showError: false,
disable: true,
labelWidth:"130px"
labelWidth: "130px"
},
{
name: "区域名称",
@ -185,7 +185,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
require: true,
width: "100%",
showError: false,
labelWidth:'130px'
labelWidth: '130px'
},
{
name: "风险等级",
@ -327,7 +327,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
this.tableColumn.push({ name: '岗位名称', key: "postName", });
this.tableColumn.push({ name: '主要危险有害因素', key: "harmfulFactors", });
this.tableColumn.push({
name: '风险等级', key: "riskLevel",width:"150px", render: (data) => {
name: '风险等级', key: "riskLevel", width: "150px", render: (data) => {
if (data.riskLevel) {
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
}
@ -398,6 +398,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public showUpdateModel(id) {
@ -498,13 +499,8 @@ export default class RiskCard extends BaseRecordComponent<any> {
})
}
public showModal(row, isReadonly) {
if (isReadonly) {
this.subIsReadonly = true
} else {
this.subIsReadonly = false
}
public showModal(row, isReadonly = false) {
this.subIsReadonly = isReadonly
this.tableService.getListDetail({ id: row.id }).then((res: any) => {
if (res.code === 200) {
@ -512,6 +508,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
safetySignName: res.data.safetySign.split(",").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(",")
}, res.data)
this.subUpdateParams.postCode = +res.data.postCode
if (res.data.resourceId) {
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
this.fileList = files.data.map(item => {

View File

@ -99,9 +99,8 @@ export default class SafeCard extends BaseRecordComponent<any> {
public formOptions: FormOption<BtnOption>[] = [{
name: "区域名称",
key: "areaId",
type: "select",
datas: this.areaList
key: "areaName",
type: "text",
}, {
name: "承诺人",
key: "promiserId",

View File

@ -83,7 +83,7 @@
:title="subIsReadonly?'详情':subUpdateParams.index||subUpdateParams.id ?'编辑': '新增'" :visible.sync="subShowUpdate"
width="952px">
<FormComponent :options="subUpdateOptions" :isReadonly="subIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="subUpdateParams" @actionCallback="triCallback" @change="changes" :actions="updateActions"
:data.sync="subUpdateParams" @actionCallback="triCallback" @change="changes" :actions="subUpdateActions"
:full-btn="true" btnPosition="center">
</FormComponent>
</el-dialog>

View File

@ -103,12 +103,14 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
type: "text",
}, {
name: "负责人",
key: "chargeUserName",
type: "text",
key: "chargeUserId",
type: "select",
datas: this.$store.state.userList,
}, {
name: "成立时间",
key: "establishTime",
type: "date",
format: "yyyy-MM-dd"
}];
public subActions = [{
@ -304,8 +306,8 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
this.subTableColumn.push({ name: '序号', key: "index", });
this.subTableColumn.push({ name: '姓名', key: "userName",});
this.subTableColumn.push({ name: '单位', key: "deptName",});
this.subTableColumn.push({ name: '姓名', key: "userName", });
this.subTableColumn.push({ name: '单位', key: "deptName", });
this.subTableColumn.push({ name: '职务', key: "duty", });
this.subTableColumn.push({ name: '联系方式', key: "phone" });
this.subTableColumn.push({ name: '职责描述', key: "description", width: "250px", showTip: true, });
@ -366,6 +368,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public doSave(goOn?) {
@ -394,7 +397,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
} as any
this.showUpdate = !!goOn;
this.getTableData();
this.fileList = [];
if (goOn === true) {
this.getFormNumber()
}
@ -461,7 +464,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
}
public onRemove(file, fileList) {
this.fileList.splice(this.fileList.findIndex(item => item.id === file.response.data.id), 1)
this.fileList.splice(this.fileList.findIndex(item => item.id === file.id), 1)
}
public showModal(row, isReadonly) {
@ -587,10 +590,10 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
public showSubModal(row, isReadonly) {
if (isReadonly) {
this.subIsReadonly = true
this.subUpdateParams = row
this.subUpdateParams = JSON.parse(JSON.stringify(row))
} else {
this.subIsReadonly = false
this.subUpdateParams = row
this.subUpdateParams = JSON.parse(JSON.stringify(row))
}
this.subShowUpdate = true
this.buildSubForm()
@ -598,22 +601,27 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
//
public deleteSubData(indexs) {
this.$confirm('确认删除所选数据', '确认数据', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for (let i = this.updateParams.members.length - 1; i >= 0; i--) {
if (indexs.includes(i)) {
this.updateParams.members.splice(i, 1)
if (indexs.length === 0) {
this.$message.warning("请选择要删除的数据!")
} else {
this.$confirm('确认删除所选数据', '确认数据', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for (let i = this.updateParams.members.length - 1; i >= 0; i--) {
if (indexs.includes(i)) {
this.updateParams.members.splice(i, 1)
}
}
}
this.updateParams.members.forEach((item, index) => {
item.index = index + 1;
this.updateParams.members.forEach((item, index) => {
item.index = index + 1;
});
this.$message.success("删除成功")
}).catch(() => {
//
});
}).catch(() => {
//
});
}
}
public changes(data, item) {
@ -622,11 +630,11 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
//
public previewFile(url,file) {
public previewFile(url, file) {
if (file.type.indexOf("png") >= 0 || file.type.indexOf("jp") >= 0) {
this.currentUrl = file.url;
this.showFile = true;
} else{
} else {
window.open('http://119.45.186.133:8012/onlinePreview?url=' + encodeURIComponent(Base64.encode(url)), "_blank")
}
}

View File

@ -105,7 +105,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
expandLevel: Infinity,
width:"280px"
}, {
name: "实施日期",
name: "发布时间",
key: "publishTime",
type: "date",
format: "yyyy-MM-dd"
@ -273,12 +273,10 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
});
this.tableColumn.push({
name: '状态', key: "status",width:"80px", render: (data) => {
if (data.status) {
if (data.status === 1) {
return `<span class="color_1">${'在用'}</span>`
} else if (data.status === 2) {
return `<span class="color_0">${'废弃'}</span>`
}
if (data.status === 1) {
return `<span class="color_1">${'在用'}</span>`
} else if (data.status === 0) {
return `<span class="color_0">${'废弃'}</span>`
}
}
});

View File

@ -57,7 +57,10 @@ export default class Programme extends BaseRecordComponent<any> {
public fileList = [] as any;
public suitList = [] as any;
public showFile = false;
public currentUrl = null;
public subShowUpdate = false;
@ -96,7 +99,7 @@ export default class Programme extends BaseRecordComponent<any> {
}];
public formOptions: FormOption<BtnOption>[] = [{
name: "制度名称",
name: "方案名称",
key: "name",
type: "text",
}, {
@ -107,10 +110,10 @@ export default class Programme extends BaseRecordComponent<any> {
expandLevel: Infinity,
width: "280px"
}, {
name: "实施日期",
key: "publishTime",
type: "date",
format: "yyyy-MM-dd"
name: "适用年度",
key: "suitYear",
type: "select",
datas: this.suitList,
}];
public subActions = [{
@ -259,9 +262,20 @@ export default class Programme extends BaseRecordComponent<any> {
created() {
//
this.getSuitListData();
}
//
public getSuitListData() {
this.tableService.getSuitListData({}).then((res: any) => {
res.data.forEach((item) => {
let itemList = {} as any;
itemList.name = item;
itemList.value = item === '永久'?'1': item;
this.suitList.push(itemList)
})
})
}
public buildTable() {
this.tableColumn.push({ name: '方案名称', key: "name", width: "200px" });

View File

@ -114,8 +114,9 @@ export default class TrainRecords extends BaseRecordComponent<any> {
datas: this.typeList
}, {
name: "培训时间",
key: "analName",
key: "startTime",
type: "date",
format: "yyyy-MM-dd",
}];
public subActions = [{
@ -123,21 +124,9 @@ export default class TrainRecords extends BaseRecordComponent<any> {
value: "cancel"
}];
public updateActions = [] as any;
public updateActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary"
}, {
name: "保存",
value: "save",
type: "primary"
}];
public subUpdateActions = [] as any;
public updateOptions: FormOption<BtnOption>[] = [] as any;
public buildUpdateForm() {
@ -216,7 +205,19 @@ export default class TrainRecords extends BaseRecordComponent<any> {
showError: false,
},
]
this.updateActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
hide: this.updateParams.id
}, {
name: "保存",
value: "save",
type: "primary"
}];
}
public subUpdateOptions: FormOption<BtnOption>[] = []
@ -271,13 +272,29 @@ export default class TrainRecords extends BaseRecordComponent<any> {
}]
}, {
name: "得分",
type: "text",
type: "number",
key: "score",
require: true,
width: "calc(50% - 20px)",
controls: false,
showError: false,
max: 100,
min: 0,
hide: !(this.subUpdateParams.examStatus === 1)
},]
this.subUpdateActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary",
hide: this.subUpdateParams.index
}, {
name: "保存",
value: "save",
type: "primary"
}];
}
@ -287,7 +304,7 @@ export default class TrainRecords extends BaseRecordComponent<any> {
public buildTable() {
this.tableColumn.push({ name: '培训名称', key: "name"});
this.tableColumn.push({ name: '培训名称', key: "name" });
this.tableColumn.push({
name: '培训类型', key: "type", render: (data) => {
if (data.type === 1) {
@ -310,7 +327,7 @@ export default class TrainRecords extends BaseRecordComponent<any> {
}
});
this.tableColumn.push({
name: '培训层级', key: "level", render: (data) => {
name: '培训层级', key: "level", render: (data) => {
if (data.level) {
return this.$store.getters.prevention_training_level_map[data.level]
}
@ -354,6 +371,28 @@ export default class TrainRecords extends BaseRecordComponent<any> {
}
this.buildSubForm()
}
//
this.durationChange(data, item);
//
this.scoreFormat(data, item);
}
/**
* 培训时长格式化保留一位小数
* @param data
* @param item
*/
public durationChange(data: any, item: any) {
if (item && item.key === 'duration') {
this.updateParams.duration = null;
this.$set(this.updateParams, item.key, +data.toFixed(1))
}
}
public scoreFormat(data: any, item: any) {
if (item && item.key === 'score') {
this.updateParams.score = null;
this.$set(this.subUpdateParams, item.key, +data.toFixed(2))
}
}
public callback(data, type) {
@ -397,6 +436,7 @@ export default class TrainRecords extends BaseRecordComponent<any> {
pageNum: 1,
pageSize: 20,
} as any;
this.getTableData()
}
public showUpdateModel(id) {
@ -422,7 +462,7 @@ export default class TrainRecords extends BaseRecordComponent<any> {
this.toggleAll()
} else {
this.tableData.datas.forEach((item, index) => {
const find = this.selectData.find((data: any) => data.userId === item.userId);
const find = this.selectData.find((data: any) => data.id === item.id);
if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item);
}
@ -471,9 +511,9 @@ export default class TrainRecords extends BaseRecordComponent<any> {
public subCallback(data) {
if (data.value === "add") {
this.subIsReadonly = false
this.buildSubForm()
this.subUpdateParams = {} as any;
this.subShowUpdate = true
this.buildSubForm()
} else if (data.value === "cancel") {
this.showUpdate = false
} else if (data && data.value.indexOf("save") >= 0) {
@ -530,11 +570,11 @@ export default class TrainRecords extends BaseRecordComponent<any> {
public showSubModal(row, isReadonly) {
if (isReadonly) {
this.subIsReadonly = true
this.subUpdateParams = row
this.subUpdateParams = JSON.parse(JSON.stringify(row))
this.subUpdateParams.examStatusName = row.examStatus === 1 ? '已参加' : '未参加'
} else {
this.subIsReadonly = false
this.subUpdateParams = row
this.subUpdateParams = JSON.parse(JSON.stringify(row))
}
this.subShowUpdate = true
this.buildSubForm()
@ -542,7 +582,6 @@ export default class TrainRecords extends BaseRecordComponent<any> {
//
public deleteSubData(indexs) {
this.$confirm('确认删除所选数据', '确认数据', {
confirmButtonText: '确定',
cancelButtonText: '取消',