From 3054bbce49457c82df9ad32523f3a0186e268d6f Mon Sep 17 00:00:00 2001
From: yangdelong <828900aaa>
Date: 星期五, 28 五月 2021 21:17:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop
---
src/components/base-page/enterprise-emergency/events-reported/EventsReported.vue | 471 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 471 insertions(+), 0 deletions(-)
diff --git a/src/components/base-page/enterprise-emergency/events-reported/EventsReported.vue b/src/components/base-page/enterprise-emergency/events-reported/EventsReported.vue
new file mode 100644
index 0000000..b94555a
--- /dev/null
+++ b/src/components/base-page/enterprise-emergency/events-reported/EventsReported.vue
@@ -0,0 +1,471 @@
+<template>
+ <div class="event-report">
+ <el-form :model="ruleForm" ref="ruleForm" label-width="90px" class="search-form">
+ <!-- 浜嬩欢鍚嶇О-->
+ <el-form-item class="input-event-name" label="浜嬩欢鍚嶇О" prop="nameOfEvent">
+ <el-input
+ v-model="ruleForm.nameOfEvent"
+ placeholder="灏嗕簨浠跺懡鍚�"
+ ></el-input>
+ </el-form-item>
+ <!-- 浜嬩欢绫诲瀷-->
+ <el-form-item label="浜嬩欢绫诲瀷" prop="eventOfType">
+ <el-radio-group v-model="ruleForm.eventOfType">
+ <el-col :span="8" v-for="(item,index) in ruleForm.eventOfTypeList" :key="index"
+ :style="{margin:'5px 0'}">
+ <el-radio :label="item.value">
+ <span>{{ item.name }}</span>
+ </el-radio>
+ </el-col>
+ </el-radio-group>
+ </el-form-item>
+ <!-- 浜嬩欢绛夌骇-->
+ <el-form-item label="浜嬩欢鍒嗙骇" prop="eventOfLevel">
+ <el-radio-group v-model="ruleForm.eventOfLevel">
+ <el-col :span="8" v-for="(item,index) in ruleForm.eventOfLevelList" :key="index"
+ :style="{margin:'5px 0'}">
+ <el-radio :label="item.value">
+ <span>{{ item.name }}</span>
+ </el-radio>
+ </el-col>
+ </el-radio-group>
+ </el-form-item>
+ <el-row>
+ <!-- 浜嬪彂鍗曚綅-->
+ <el-col :span="12">
+ <el-form-item label="浜嬪彂鍗曚綅" prop="unit">
+ <el-select v-model="ruleForm.unit" placeholder="鍗曚綅,瑁呯疆閫夋嫨">
+ <el-option
+ v-for="item in ruleForm.unitList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <!-- 浜嬪彂鏃堕棿-->
+ <el-col :span="12">
+ <el-form-item class="search-panel-item" label="浜嬪彂鏃堕棿" prop="atTime">
+ <el-date-picker
+ v-model="ruleForm.atTime"
+ type="datetime"
+ placeholder="骞�/鏈�/鏃�">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <!-- 浜嬪彂浣嶇疆-->
+ <el-col :span="12">
+ <el-form-item label="浜嬪彂浣嶇疆" prop="positionOf">
+ <el-input v-model="ruleForm.positionOf" clearable>
+ <!-- <el-button slot="suffix" type="text" class="el-icon-location-information"-->
+ <!-- @click="locationInfo"></el-button>-->
+ <el-button style="padding-right:10px;" slot="suffix" type="text"
+ @click="locationInfo">
+ <img src="../../../../../public/assets/images/map/loc.png" alt="">
+ </el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <!-- 浣嶇疆鎻忚堪-->
+ <el-col :span="12">
+ <el-form-item label="浣嶇疆鎻忚堪" prop="positionDescription">
+ <el-input v-model="ruleForm.positionDescription"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <!-- 绠$嚎鍚嶇О-->
+ <el-col :span="12">
+ <el-form-item label="绠$嚎鍚嶇О" prop="lineName" class="search-panel-item">
+ <el-input disabled v-model="ruleForm.lineName" placeholder="鑷姩甯﹀嚭涓嶅彲淇敼"
+ class="report-input"></el-input>
+ </el-form-item>
+ </el-col>
+ <!-- 绠$嚎绫诲瀷-->
+ <el-col :span="12">
+ <el-form-item label="绠$嚎绫诲瀷" prop="lineType">
+ <label>{{ ruleForm.lineTypeText }}</label>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <!-- 鐐瑰嚮涓婁紶-->
+ <el-form-item label="闄勪欢涓婁紶" prop="upload">
+ <el-upload
+ class="upload-demo"
+ action="uploadAction"
+ multiple
+ :limit="3"
+ :file-list="fileList">
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ </el-upload>
+ </el-form-item>
+ <!-- 娑堟伅鎺ㄩ��-->
+ <el-form-item label="娑堟伅鎺ㄩ��" prop="beingPush">
+ <el-checkbox-group v-model="ruleForm.beingPushed" @change="infoChange">
+ <el-checkbox v-for="item in ruleForm.beingPushList"
+ :key="item.name"
+ :label="item.name"
+ >
+ </el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ <!-- // 鎻忚堪 鎺ユ敹 灞曠ず銆侀殣钘�-->
+ <div v-show="wayTo" class="way-to">
+ <el-form-item label="浜嬩欢鎻忚堪" prop="desc">
+ <el-input type="textarea" resize="none" v-model="ruleForm.desc"
+ placeholder="甯﹀嚭浜嬩欢绫诲瀷锛屼簨浠朵綅缃紝浜嬩欢鍗曚綅锛屼簨浠舵椂闂寸瓑瀛楁鑷姩鐢熶骇涓�閮ㄥ垎鎻忚堪">
+ </el-input>
+ <el-button type="primary">涓�閿�<br/>鐢熸垚</el-button>
+ </el-form-item>
+ <el-form-item label="鎺ユ敹浜哄憳" prop="receiveOne">
+ <el-input type="textarea" resize="none" v-model="ruleForm.receiveOne"
+ placeholder="寮犱笁锛涙潕鍥涳紝"></el-input>
+ <el-button type="primary">+</el-button>
+ </el-form-item>
+ </div>
+ <el-form-item class="confirmCancel">
+ <el-button type="primary" @click="submitForm('ruleForm')">纭</el-button>
+ <el-button @click="resetForm('ruleForm')">鍙栨秷</el-button>
+ </el-form-item>
+ </el-form>
+ <el-dialog
+ custom-class="event-report-dialog"
+ title="浜嬪彂浣嶇疆瀹氫綅"
+ :visible.sync="dialogLocation"
+ :append-to-body="true"
+ :modal="false"
+ v-dialogDrag
+ >
+ <ReportLocation @locationClick="getlocaltionClick"></ReportLocation>
+ </el-dialog>
+ </div>
+</template>
+<!-- :rules="rules"-->
+<!-- :show-close="false"-->
+<script>
+
+import ReportLocation from './ReportLocation'
+import eventBus from '../../../../eventBus'
+
+export default {
+ name: 'EventsReported',
+ components: {
+ ReportLocation
+ },
+ data () {
+ return {
+ // 琛ㄥ崟缁戝畾鏁版嵁
+ ruleForm: {
+ // 浜嬩欢鍚嶇О 缁戝畾鏁版嵁
+ nameOfEvent: '',
+ // 浜嬩欢绫诲瀷 缁戝畾鏁版嵁鍊�
+ eventOfType: '',
+ // 浜嬩欢绫诲瀷鍙�夋嫨鏁版嵁radio 缁戝畾鏁版嵁
+ eventOfTypeList: [
+ {
+ name: '娴�(姘�)涓婃孩娌规薄鏌�',
+ value: 1
+ },
+ {
+ name: '娌规皵绠¢亾娉勬紡姹℃煋',
+ value: 2
+ },
+ {
+ name: '杈愬皠姹℃煋',
+ value: 3
+ },
+ {
+ name: '鐢熸�佺幆澧冪牬鍧�',
+ value: 4
+ },
+ {
+ name: '鍏朵粬',
+ value: 5
+ }
+ ],
+ // 浜嬩欢绛夌骇
+ eventOfLevel: '',
+ // 浜嬩欢绛夌骇鍙�夋嫨鏁版嵁radio 缁戝畾鏁版嵁
+ eventOfLevelList: [
+ {
+ name: '鐗瑰埆閲嶅ぇ鐜浜嬩欢',
+ value: 1
+ },
+ {
+ name: '閲嶅ぇ鐜浜嬩欢',
+ value: 2
+ },
+ {
+ name: '杈冨ぇ鐜浜嬩欢',
+ value: 3
+ },
+ {
+ name: '涓�鑸珹绾�',
+ value: 4
+ },
+ {
+ name: '涓�鑸珺绾�',
+ value: 5
+ },
+ {
+ name: '涓�鑸珻绾�',
+ value: 6
+ }
+ ],
+ // 浜嬪彂鍗曚綅 缁戝畾鏁版嵁鍊�
+ unit: '',
+ unitList: [
+ {
+ label: '鎵瓙',
+ value: '1'
+ },
+ {
+ label: '鍗椾含',
+ value: '2'
+ }
+ ],
+ // 浜嬪彂鏃堕棿 缁戝畾鏁版嵁
+ atTime: '',
+ // 浜嬪彂浣嶇疆
+ positionOf: '',
+ // 浣嶇疆鎻忚堪
+ positionDescription: '',
+ // 绠$嚎鍚嶇О
+ lineName: '',
+ // 绠$嚎绫诲瀷
+ lineType: '',
+ lineTypeText: '鑷姩甯﹀嚭涓嶅彲淇敼',
+ // 娑堟伅鎺ㄩ��
+ beingPushed: [],
+ beingPushList: [
+ {
+ name: '鐭俊鎺ㄩ��',
+ value: false
+ },
+ {
+ name: '鎵嬫満搴旂敤鎺ㄩ��',
+ value: false
+ }
+ ],
+ // 浜嬩欢鎻忚堪
+ desc: '',
+ // 鎺ユ敹浜哄憳
+ receiveOne: ''
+ },
+ // 涓婁紶鍒楄〃
+ fileList: [],
+ // 涓婁紶鍦板潃
+ uploadAction: '',
+ // 琛ㄥ崟楠岃瘉
+ // rules: {
+ // // 浜嬩欢鍚嶇О鏍¢獙
+ // nameOfEvent: [
+ // {
+ // required: true,
+ // message: '璇疯緭鍏ユ椿鍔ㄥ悕绉�',
+ // trigger: 'blur'
+ // }
+ // ],
+ // // 浜嬩欢绫诲瀷鏍¢獙
+ // eventOfType: [
+ // {
+ // required: true,
+ // message: '璇烽�夋嫨浜嬩欢绫诲瀷',
+ // trigger: 'blur'
+ // }
+ // ],
+ // // 浜嬩欢绛夌骇鏍¢獙
+ // eventOfLevel: [
+ // {
+ // required: true,
+ // message: '璇烽�夋嫨浜嬩欢绛夌骇',
+ // trigger: 'blur'
+ // }
+ // ],
+ // // 浜嬪彂鍗曚綅 缁戝畾鏁版嵁鍊�
+ // unit: [
+ // {
+ // required: true,
+ // message: '璇烽�夋嫨娲诲姩鍖哄煙',
+ // trigger: 'change'
+ // }
+ // ],
+ // // 浜嬪彂鏃堕棿
+ // atTime: [
+ // {
+ // required: true,
+ // message: '璇烽�夋嫨娲诲姩璧勬簮',
+ // trigger: 'change'
+ // }
+ // ],
+ // // 浜嬩欢浣嶇疆鏍¢獙
+ // positionOf: [
+ // {
+ // required: true,
+ // message: '璇疯緭鍏ユ椿鍔ㄤ綅缃�',
+ // trigger: 'blur'
+ // }
+ // ],
+ // // 浣嶇疆鎻忚堪鏍¢獙
+ // positionDescription: [
+ // {
+ // required: true,
+ // message: '璇疯緭鍏ヤ綅缃弿杩�',
+ // trigger: 'blur'
+ // }
+ // ],
+ // // 绠$嚎鍚嶇О
+ // lineName: [],
+ // // 绠$嚎绫诲瀷
+ // lineType: []
+ // },
+ // 鎻忚堪 鎺ユ敹 => 灞曠ず/闅愯棌
+ wayTo: false,
+ // 瀹氫綅浣嶇疆閫夋嫨寮规
+ dialogLocation: false
+ }
+ },
+ mounted () {
+ eventBus.$on('location-setChange', (obj) => {
+ if (obj) {
+ this.dialogLocation = false
+ }
+ })
+ },
+ methods: {
+ // 鎺ユ敹瀛愮粍浠朵紶閫掔殑鏁版嵁
+ getlocaltionClick (val) {
+ // console.log(val)
+ this.ruleForm.positionOf = val.latPos + '-' + val.longPos
+ this.dialogLocation = !this.dialogLocation
+ },
+ // 娑堟伅鎺ㄩ�� 閫夋嫨鎺ㄩ�佺殑瀵硅薄
+ infoChange () {
+ if (this.ruleForm.beingPushed.indexOf('鐭俊鎺ㄩ��') > -1 || this.ruleForm.beingPushed.indexOf('鎵嬫満搴旂敤鎺ㄩ��') > -1) {
+ this.wayTo = true
+ } else {
+ this.wayTo = false
+ }
+ },
+ // 鐐瑰嚮瀹氫綅 杩涜浣嶇疆閫夋嫨
+ locationInfo () {
+ this.dialogLocation = !this.dialogLocation
+ },
+ // 琛ㄥ崟鐨勭‘璁ゆ寜閽偣鍑讳簨浠�
+ submitForm (formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ // alert('submit!')
+ this.$message({
+ message: '浜嬩欢涓婃姤鎻愪氦鎴愬姛',
+ type: 'success'
+ })
+ } else {
+ this.$message('浜嬩欢涓婃姤鎻愪氦澶辫触')
+ return false
+ }
+ })
+ // this.$refs[formName].resetFields()
+ eventBus.$emit('event-report-popup', false)
+ },
+ // form琛ㄥ崟鐨勫彇娑堟寜閽偣鍑讳簨浠� 閲嶇疆淇℃伅
+ resetForm (formName) {
+ this.$refs[formName].resetFields()
+ eventBus.$emit('event-report-popup', false)
+ }
+ }
+}
+</script>
+
+<style lang="less" scoped>
+
+ /*/deep/ .el-dialog .el-dialog--center {*/
+ /* margin-top: 1rem !important;*/
+ /* margin-left: 6.4rem !important;*/
+ /*}*/
+
+ /deep/ .event-report-dialog {
+ left: 5rem;
+ top: 1rem;
+ margin-top: 2rem;
+ margin-left: 2rem;
+ }
+
+ /deep/ .el-dialog {
+ left: 5rem;
+ top: 1rem;
+ width: 3.087834rem;
+ }
+
+ .event-report {
+ margin: 0 5px !important;
+ }
+
+ .way-to {
+ /deep/ .el-form-item__content {
+ display: flex;
+ }
+ }
+
+ /deep/ .el-form-item {
+ margin: 2px 0 !important;
+ color: #00fff6 !important;
+ }
+
+ /deep/ .el-textarea__inner {
+ height: 0.28rem !important;
+ max-height: 0.45rem !important;
+ width: 2rem;
+ color: darkgrey;
+ border: solid 1px #00fff6;
+ background-color: rgba(0, 255, 246, 0.14);
+ outline: none;
+ font-size: 0.01rem;
+ }
+
+ /deep/ .el-checkbox__label {
+ color: #00fff6 !important;
+ }
+
+ /deep/ .el-icon-time:before {
+ content: " ";
+ }
+
+ /deep/ input {
+ border-radius: 0;
+ background-color: rgba(0, 255, 246, 0.14);
+ border: solid 1px #00fff6;
+ color: #C0C4CC;
+ font-size: 0.01rem;
+ }
+
+ /deep/ .el-input.is-disabled .el-input__inner {
+ color: #C0C4CC;
+ font-size: 0.01rem;
+ border-radius: 4px;
+ background: @background-color;
+ border-color: @color;
+ }
+
+ /deep/ .el-input__inner {
+ height: 0.2rem !important;
+ border-radius: 5px;
+ background: rgba(0, 16, 30, 0.5);
+ }
+
+ /deep/ .el-form-item__label {
+ color: @color;
+ }
+
+ /deep/ .el-radio__label {
+ color: @color;
+ }
+
+ .confirmCancel {
+ text-align: right;
+ margin: 0.071234rem !important;
+ }
+</style>
--
Gitblit v1.8.0