Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/smartBuilding
| | |
| | | width: 250, |
| | | }} |
| | | defaultValue={''} |
| | | allowClear |
| | | onChange={ |
| | | (value) => { |
| | | this.handleListBodyChange('clientType', value) |
| | |
| | | width: 250, |
| | | }} |
| | | defaultValue={''} |
| | | allowClear |
| | | onChange={ |
| | | (value) => { |
| | | this.handleListBodyChange('creatorId', value) |
| | |
| | | this.setState(prevState => ({ |
| | | listBody: { |
| | | ...prevState.listBody, |
| | | [key]: value |
| | | [key]: value ? value : '' |
| | | } |
| | | }), () => { |
| | | this.reloadEntities() |
| | |
| | | |
| | | // 处理启用禁用实体 |
| | | handleEnableDisableEntity = (row) => { |
| | | |
| | | |
| | | }; |
| | | |
| | | // 处理参数设置实体 |
| | |
| | | |
| | | // 处理删除实体 |
| | | handleDeleteEntity = (rows) => { |
| | | |
| | | |
| | | // 如果传入的是单个对象,将其放入数组中 |
| | | if (!Array.isArray(rows)) { |
| | | rows = [rows]; |
| | |
| | | |
| | | const ids = rows.map(row => row.id); |
| | | console.log(ids); |
| | | |
| | | |
| | | this.deleteEntities({ |
| | | ids: ids |
| | | }).then(res => { |
| | |
| | | let formState = this.editFormRef.state |
| | | let action = formState.isEdit ? '编辑' : '添加'; |
| | | this.editEntity(formState.editableData, formState.isEdit).then((response) => { |
| | | |
| | | |
| | | if (response.data.status === 'OK') { |
| | | form.resetFields(); |
| | | message.success(action + "成功!") |
| | |
| | | ); |
| | | } |
| | | |
| | | // 渲染参数设置按钮 |
| | | // 渲染参数设置按钮 |
| | | renderParameterSettingButton(row, permission = null, disable = false) { |
| | | return ( |
| | | <Button title="参数设置" onClick={this.handleParameterSettingEntity.bind(null, row)} |
| | |
| | | addAccidentBrief, |
| | | editAccidentBrief, |
| | | deleteAccidentBrief, |
| | | enableAccidentBrief |
| | | enableAccidentBrief, |
| | | getAccidentClassificationList |
| | | } from "@/api/screenSetting"; |
| | | import EditAccidentMessageForm from "./forms/edit-accidentMessage-form"; |
| | | import "./style/index.less"; |
| | |
| | | import moment from "moment"; |
| | | |
| | | const { Column } = Table; |
| | | const { Option } = Select; |
| | | const inputLongStyle = { |
| | | padding: "1px 10px", |
| | | width: "250px", |
| | | }; |
| | | |
| | | class AccidentMessageSetting extends CrudViewBase { |
| | | constructor(props) { |
| | | super(props); |
| | | this.state = { |
| | | ...this.state, |
| | | classificationOptions: [] |
| | | }; |
| | | } |
| | | |
| | | initView() { |
| | | this.loadClassificationOptions(); |
| | | } |
| | | |
| | | loadClassificationOptions = () => { |
| | | getAccidentClassificationList({ page: 0, size: 9999 }, {}).then(res => { |
| | | if (res && res.data && res.data.data && res.data.data.records) { |
| | | this.setState({ classificationOptions: res.data.data.records }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | initListBody() { |
| | | return { |
| | | title: "", |
| | | classifyId: undefined |
| | | }; |
| | | } |
| | | |
| | | getEntityList(pageInfo, listBody) { |
| | | const params = { |
| | | title: listBody.title |
| | | title: listBody.title, |
| | | classifyId: listBody.classifyId |
| | | }; |
| | | return getAccidentBriefList(pageInfo, params); |
| | | } |
| | |
| | | prefix={<Icon style={{ marginLeft: "4px" }} type="search" />} |
| | | allowClear |
| | | /> |
| | | |
| | | <Select |
| | | style={inputLongStyle} |
| | | placeholder="请选择事故类型" |
| | | value={this.state.listBody ? this.state.listBody.classifyId : undefined} |
| | | onChange={(value) => { |
| | | this.handleListBodyChange("classifyId", value); |
| | | }} |
| | | allowClear |
| | | > |
| | | {this.state.classificationOptions.map(option => ( |
| | | <Option key={option.id} value={option.id}> |
| | | {option.name} |
| | | </Option> |
| | | ))} |
| | | </Select> |
| | | </div> |
| | | |
| | | <div className="right">{this.renderAddButton("device:add")}</div> |
| | |
| | | localStorage.setItem("clientId", params.get("clientId")); |
| | | localStorage.setItem("clientName", params.get("clientName")); |
| | | localStorage.setItem("clientLogo", r.logo); |
| | | localStorage.setItem("deviceTemplateId", r.deviceTemplateId);//设备模板id |
| | | localStorage.setItem("safetyId", r.safetyId);//安全报告模板id |
| | | localStorage.setItem("bigHiddenDanger", r.bigHiddenDanger); //1开启 2关闭 重大隐患 |
| | | localStorage.setItem("generalHiddenDanger", r.generalHiddenDanger);//1开启 2关闭 一般隐患 |
| | | localStorage.setItem("commentType", r.commentType); //1模糊评价 2打分评价 |
| | | this.$router.replace({ |
| | | path: "/home", |
| | | }); |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="检查时间" prop="createTime" min-width="180" /> |
| | | <el-table-column label="整改状态" min-width="120"> |
| | | <el-table-column |
| | | label="检查时间" |
| | | prop="createTime" |
| | | min-width="180" |
| | | /> |
| | | <el-table-column v-if="showReformedFilter" label="整改状态" min-width="120"> |
| | | <template #default="{ row }"> |
| | | <div class="flex a-center j-center"> |
| | | <div class="ripple"> |
| | |
| | | // localStorage 配置 |
| | | bigHiddenDangerConfig: null, // 重大隐患配置:1开启 2关闭 |
| | | generalHiddenDangerConfig: null, // 一般隐患配置:1开启 2关闭 |
| | | projectCategory: null, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | if (this.$route.query.projectName) { |
| | | this.projectName = this.$route.query.projectName; |
| | | } |
| | | if (this.$route.query.projectCategory) { |
| | | this.projectCategory = this.$route.query.projectCategory; |
| | | } |
| | | |
| | | // 判断是否委托方端:通过 projectId 判断 |
| | |
| | | params.type = this.currentType; |
| | | } else { |
| | | params.clientId = localStorage.getItem('clientId'); |
| | | if (this.projectCategory) { |
| | | params.projectCategory = this.projectCategory |
| | | } |
| | | // 委托方:只在重大隐患 Tab 且用户选择了类型时传递 type |
| | | if (this.activeTab === 1 && this.searchForm.type) { |
| | | params.type = this.searchForm.type; |
| | |
| | | } else { |
| | | this.dateTxt = ""; |
| | | } |
| | | this.getScreenData(); |
| | | this.$nextTick(()=>{ |
| | | this.getScreenData(); |
| | | }) |
| | | }, |
| | | immediate: true, |
| | | }, |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | getScreenData() { |
| | | let params = { |
| | | projectCategory: ["ongoing", "fixed"][this.activeTab - 1], |
| | |
| | | this.$router.push("/workList"); |
| | | }, |
| | | toPorjectList() { |
| | | this.$router.push("/projectList"); |
| | | this.$router.push(`/projectList?projectCategory=${["ongoing", "fixed"][this.activeTab - 1]}`); |
| | | }, |
| | | toEquipmentList() { |
| | | this.$router.push("/equipmentList"); |
| | | }, |
| | | toHiddenDanger() { |
| | | this.$router.push("/hiddenDanger"); |
| | | this.$router.push(`/hiddenDanger?projectCategory=${["ongoing", "fixed"][this.activeTab - 1]}`); |
| | | }, |
| | | // 切换活动索引 |
| | | changeActiveIndex(index) { |
| | |
| | | <template #content> |
| | | <div class="project-info"> |
| | | <div class="info-item"> |
| | | <div class="flex2 flex"> |
| | | <!-- <div class="flex2 flex"> |
| | | <div class="label">项目编号</div> |
| | | <div class="value">{{ projectInfo.code || '-' }}</div> |
| | | </div> |
| | | </div> --> |
| | | <div class="flex1 flex"> |
| | | <div class="label">工程类型</div> |
| | | <div class="value">{{ projectInfo.type || '-' }}</div> |
| | | <div class="value">{{ ['房建工程','市政工程','固定资产'][projectInfo.type] }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="info-item"> |
| | |
| | | |
| | | // 评价类型 |
| | | commentType: localStorage.getItem("commentType") || null, |
| | | projectCategory:null, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | if (this.$route.query.projectCategory) { |
| | | this.projectCategory = this.$route.query.projectCategory; |
| | | } |
| | | this.initUserInfo(); |
| | | this.initData(); |
| | | }, |
| | |
| | | if (this.endTime) |
| | | params.endTime = moment(this.endTime).format("YYYY-MM-DD HH:mm:ss"); |
| | | if (this.projectName) params.name = this.projectName; |
| | | if (this.projectCategory) { |
| | | params.projectCategory = this.projectCategory |
| | | } |
| | | |
| | | const res = await projectList(params); |
| | | if (res) { |
| | |
| | | }, |
| | | |
| | | openImgDialog(img) { |
| | | this.imgArr = img.split(","); |
| | | this.imgArr = img.split(",").map((item) => { |
| | | return process.env.VUE_APP_IMAGE_BASE_URL + "/project/download/" + item; |
| | | }); |
| | | this.previewVisible = true; |
| | | }, |
| | | |