From dc04c05b22a5323925218092a0687555a2a5c9c1 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期四, 29 九月 2022 18:39:31 +0800
Subject: [PATCH] 上报管理界面,案件池的违规、违建登记页面

---
 src/views/operate/disposal/casepool/pool/createUser/vio/index.vue |  380 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 378 insertions(+), 2 deletions(-)

diff --git a/src/views/operate/disposal/casepool/pool/createUser/vio/index.vue b/src/views/operate/disposal/casepool/pool/createUser/vio/index.vue
index d0ef7c6..8f60473 100644
--- a/src/views/operate/disposal/casepool/pool/createUser/vio/index.vue
+++ b/src/views/operate/disposal/casepool/pool/createUser/vio/index.vue
@@ -1,3 +1,379 @@
 <template>
-    <div>1</div>
-</template>
\ No newline at end of file
+    <div class="vio">
+        <div class="input-area">
+            <div class="input-header">
+                <div class="input-header__title">鍩虹淇℃伅</div>
+                <div class="input-header__tip">濉啓浜嬩欢鍩虹淇℃伅</div>
+            </div>
+            <div class="input-form">
+                <el-form ref="user" label-width="100px" autoComplete="on" :model="vio" :rules="createRoleRules"
+                    label-position="right">
+                    <!-- 闂绫诲瀷 -->
+                    <el-form-item class="optionItem" label="闂绫诲瀷:" prop="category">
+                        <el-select v-model="vio.category" placeholder="杩濊" disabled>
+                            <el-option v-for="item in typeList" :key="item.label" :label="item.label"
+                                :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <!-- 澶х被鍚嶇О -->
+                    <el-form-item class="optionItems" label="澶х被鍚嶇О:" prop="categoryId">
+                        <el-select v-model="vio.categoryId" placeholder="璇烽�夋嫨澶х被鍚嶇О">
+                            <el-option v-for="item in bigKindList" :key="item.id" :label="item.name" :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <!-- 灏忕被鍚嶇О -->
+                    <el-form-item class="optionItems" label="灏忕被鍚嶇О:" prop="typeId">
+                        <el-select v-model="vio.typeId" placeholder="璇烽�夋嫨灏忕被鍚嶇О">
+                            <el-option v-for="item in smallKindList" :key="item.id" :label="item.name" :value="item.id"
+                                :disabled="item.disabled">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <!-- 浜嬩欢绛夌骇 -->
+                    <el-form-item class="optionItems" label="浜嬩欢绛夌骇:" prop="status">
+                        <el-select v-model="vio.level" placeholder="璇烽�夋嫨妗堜欢绛夌骇">
+                            <el-option v-for="item in eventLevelList" :key="item.id" :label="item.name" :value="item.id"
+                                :disabled="item.disabled">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <!-- 妗堢敱 -->
+                    <el-form-item class="optionItem" label="妗堢敱:" prop="actionCause">
+                        <el-input v-model="vio.actionCause" placeholder="璇疯緭鍏ユ鐢�"></el-input>
+                    </el-form-item>
+                    <!-- 鎵�灞炲尯鍘� -->
+                    <!-- <el-form-item class="optionItems" label="鎵�灞炲尯鍘�:" prop="status">
+                        <el-select v-model="vio.type" placeholder="璇烽�夋嫨鎵�灞炲尯鍘�">
+                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
+                                :disabled="item.disabled">
+                            </el-option>
+                        </el-select>
+                    </el-form-item> -->
+                    <!-- 鎵�灞炵ぞ鍖� -->
+                    <!-- <el-form-item class="optionItems" label="鎵�灞炵ぞ鍖�:" prop="status">
+                        <el-select v-model="vio.type" placeholder="璇烽�夋嫨鎵�灞炵ぞ鍖�">
+                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
+                                :disabled="item.disabled">
+                            </el-option>
+                        </el-select>
+                    </el-form-item> -->
+                    <!-- 鎵�灞炶閬� -->
+                    <!-- <el-form-item class="optionItems" label="鎵�灞炶閬�:" prop="status">
+                        <el-select v-model="vio.type" placeholder="璇烽�夋嫨鎵�灞炶閬�">
+                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
+                                :disabled="item.disabled">
+                            </el-option>
+                        </el-select>
+                    </el-form-item> -->
+                    <!-- 浜嬪彂鍦扮偣 -->
+                    <el-form-item class="optionItems" label="浜嬪彂鍦扮偣:" prop="site">
+                        <el-input placeholder="璇疯緭鍏ヤ簨鍙戝湴璇︾粏浣嶇疆" v-model="vio.site"></el-input>
+                    </el-form-item>
+                    <!-- 鏄惁鍏宠仈鍟嗛摵 -->
+                    <el-form-item class="optionItems" label="鏄惁鍏宠仈鍟嗛摵:" prop="linkShop">
+                        <el-radio-group v-model="vio.linkShop">
+                            <el-radio :label="1">鏄�</el-radio>
+                            <el-radio :label="0">鍚�</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                    <!-- 鍏宠仈鍟嗛摵鍚嶇О -->
+                    <el-form-item class="optionItems" label="鍏宠仈鍟嗛摵鍚嶇О:" prop="shopName">
+                        <el-input placeholder="璇峰~鍐欏叧鑱斿晢閾哄悕绉�" v-model="vio.shopName" :disabled="vio.linkShop === 1 ?false : true"></el-input>
+                    </el-form-item>
+                    <!-- 濉啓杞︾墝鍙� -->
+                    <el-form-item class="optionItems" label="濉啓杞︾墝鍙�:" prop="carNumber">
+                        <el-input placeholder="璇峰~鍐欒溅鐗屽彿" v-model="vio.carNumber"></el-input>
+                    </el-form-item>
+                    <!-- 闂鎻忚堪 -->
+                    <el-form-item class="optionItems" label="闂鎻忚堪:" prop="description">
+                        <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�200瀛椾互鍐�" v-model="vio.description"></el-input>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <div class="not-need">
+                <div class="not-need__header">
+                    濉啓鍙嶆槧浜轰俊鎭�
+                </div>
+                <div class="not-need-item">
+                    <label>鍙嶆槧浜�:</label>
+                    <input type="text" class="not-need__inner">
+                </div>
+                <div class="not-need-item">
+                    <label>鑱旂郴鏂瑰紡:</label>
+                    <input type="text" class="not-need__inner">
+                </div>
+                <div class="not-need-item">
+                    <label>韬唤璇佸彿:</label>
+                    <input type="text" class="not-need__inner">
+                </div>
+            </div>
+            <div class="input-footer">
+                <el-button type="primary" class="confirm" @click="handleSubmit">纭畾</el-button>
+                <el-button class="back">杩斿洖</el-button>
+            </div>
+        </div>
+        <div class="map-area">
+            <!-- <MyMap /> -->
+        </div>
+    </div>
+</template>
+<script>
+import MyMap from '@/components/map'
+export default {
+    components: {
+        MyMap
+    },
+    data() {
+        const validateNickname = (rule, value, callback) => {
+            if (!value) {
+                callback(new Error("璇峰~鍐欓棶棰樼被鍨�"));
+            } else {
+                callback();
+            }
+        };
+        const validatePass = (rule, value, callback) => {
+            if (!value) {
+                callback();
+            } else {
+                // const rep = /^\w+$/;
+                // if (!rep.test(value)) {
+                //     callback(new Error("瀵嗙爜鍙兘鏄互鏁板瓧銆�26涓嫳鏂囧瓧姣嶆垨鑰呬笅鍒掔嚎缁勬垚鐨勫瓧绗︿覆"));
+                // }
+                callback();
+            }
+        };
+        const validateTruename = (rule, value, callback) => {
+            if (value) {
+                callback();
+            } else {
+                // const rep = /^[\u4E00-\u9FA5]{2,4}$/;
+                // if (!rep.test(value)) {
+                //     callback("璇疯緭鍏ユ纭殑鐢ㄦ埛濮撳悕");
+                // }
+                callback();
+            }
+        };
+        return {
+            vio: {
+                actionCause: "dasdas",//妗堢敱
+                carNumber: "宸漦123456",//杞︾墝鍙�
+                category: '',//1:杩濊2:杩濆缓
+                categoryId: 0,//澶х被
+                communityId: 0,//鎵�灞炵ぞ鍖�
+                description: "澶ф拻澶ф拻",//闂鎻忚堪
+                informant: "澶ц嫃鎵�",//鍙嶆槧浜�
+                informantIdCard: "51102519910082831",//韬唤璇佸彿鐮�
+                informantPhoneCode: "17844631885",//鍙嶆槧浜鸿仈绯绘柟寮�
+                linkShop: 0,//鏄惁鍏宠仈鍟嗛摵(0鍚�1鏄�)
+                shopName: "",//鍏宠仈鍟嗛摵鍚嶇О
+                site: "灏忓湴鏂�",//浜嬪彂鍦扮偣
+                streetId: 0,//鎵�灞炶閬�
+                typeId: 0//灏忕被
+            },
+            createRoleRules: {
+                name: [
+                    { required: true, trigger: "blur", validator: validateNickname },
+                ],
+                type: [
+                    { required: false, trigger: "blur", validator: validatePass },
+                ],
+                description: [
+                    { required: false, trigger: "blur", validator: validateTruename },
+                ],
+            },
+            bigKindList: [],
+            smallKindList: [],
+            eventLevelList: [],
+            typeList: [
+                {
+                    label: '杩濊',
+                    value: 1.
+                },
+                {
+                    label: '杩濆缓',
+                    value: 2.
+                }
+            ]
+
+        }
+    },
+    created() {
+        const { getBigKind, getEventLevel, getSmallKind } = this;
+        console.log(this.mytype);
+        this.vio.category = this.mytype + 1;
+        getBigKind();
+        getSmallKind();
+        getEventLevel();
+    },
+    methods: {
+        // handleUser() {
+        //     this.$refs['user'].validate((valid) => {
+        //         console.log(valid);
+        //         if (valid) {
+        //             const { role } = this;
+        //             console.log(role);
+        //             this.$axios.post('sccg/role/create', {
+        //                 description: role.description, name: role.name, type: role.type
+        //             }).then(res => {
+        //                 if (res.code === 200) {
+        //                     this.refresh();
+        //                 }
+        //             })
+        //         } else {
+        //             return false;
+        //         }
+        //     })
+        // },
+        handleStop() {
+            this.refresh();
+        },
+        // 鑾峰彇澶х被鍒楄〃
+        getBigKind() {
+            this.$axios({
+                method: 'get',
+                url: 'sccg/violations/query/type_first'
+            }).then(res => {
+                this.bigKindList = res.data;
+                // console.log(res);
+            })
+        },
+        // 鑾峰彇灏忕被鍒楄〃
+        getSmallKind() {
+            this.$axios({
+                method: 'get',
+                url: 'sccg/violations/query/type_second'
+            })
+                .then(res => {
+                    this.smallKindList = res.data;
+                })
+        },
+        // 鑾峰彇妗堜欢绛夌骇鍒楄〃
+        getEventLevel() {
+            this.$axios({
+                method: 'get',
+                url: 'sccg/violations/query/event_type'
+            })
+                .then(res => {
+                    this.eventLevelList = res.data;
+                })
+        },
+        // 鑾峰彇琛屾斂鍖哄煙
+        getRegion() {
+            this.$axios({
+                method: 'get',
+                url: 'sccg/sccg-region/getTree',
+            })
+                .then(res => {
+                    // this.
+                })
+        },
+        // 鎻愪氦娉ㄥ唽淇℃伅
+        handleSubmit() {
+            const { vio } = this;
+            console.log(vio);
+            this.$axios({
+                method:'post',
+                url:'sccg/base-case/addition_violation',
+                data:vio
+            })
+            .then(res=>{
+                console.log(res);
+            })
+            // this.$axios.post('sccg/role/create', {
+            //     description: role.description, name: role.name, type: role.type
+            // }).then(res => {
+            //     if (res.code === 200) {
+            //         this.refresh();
+            //     }
+            // })
+        }
+    },
+    props: ['mytype']
+}
+</script>
+<style lang="scss" scoped>
+.vio {
+    display: flex;
+
+    .input-area {
+        flex: 1;
+        padding: 10px 20px;
+
+        .input-header {
+            color: #4b9bb7;
+
+            .input-header__title {
+                line-height: 60px;
+                font-weight: 650;
+                font-size: 20px;
+            }
+
+            .input-header__tip {
+                line-height: 40px;
+            }
+        }
+
+        .input-form {
+            .el-form {
+                &::v-deep .el-form-item__label {
+                    color: #4b9bb7;
+                }
+
+                &::v-deep .el-input__inner {
+                    background-color: #09152f;
+                    border: 1px solid #17324c;
+                }
+
+                &::v-deep .el-textarea__inner {
+                    background-color: #09152f;
+                    border: 1px solid #17324c;
+                }
+            }
+        }
+
+        .input-footer {
+            display: flex;
+            justify-content: center;
+        }
+    }
+
+    .map-area {
+        flex: 1;
+    }
+
+    .not-need {
+        color: #4b9bb7;
+
+        .not-need__header {
+            line-height: 40px;
+        }
+
+        .not-need-item {
+            line-height: 40px;
+            margin-bottom: 22px;
+            display: flex;
+
+            label {
+                width: 100px;
+                padding-right: 12px;
+                text-align: right;
+            }
+
+            .not-need__inner {
+                flex: 1;
+                line-height: 40px;
+                padding: 0 15px;
+                border-radius: 4px;
+                color: #fff;
+                // outline: #409eff solid 1px;
+                outline: none;
+                background-color: #09152f;
+                border: 1px solid #17324c;
+            }
+        }
+    }
+
+}
+</style>
\ No newline at end of file

--
Gitblit v1.8.0