From e5b58707bae2d4e153560f51ed38859c530e9a66 Mon Sep 17 00:00:00 2001 From: liyanqi <15181887205@163.com> Date: 星期二, 01 十一月 2022 14:31:21 +0800 Subject: [PATCH] 普查列表页面 --- src/views/operate/rectification/surveyList/components/viewInterface/index.vue | 488 ++++++++++++++++++++++++++++------------------------- 1 files changed, 257 insertions(+), 231 deletions(-) diff --git a/src/views/operate/rectification/surveyList/components/viewInterface/index.vue b/src/views/operate/rectification/surveyList/components/viewInterface/index.vue index 6b28ebb..286fcf4 100644 --- a/src/views/operate/rectification/surveyList/components/viewInterface/index.vue +++ b/src/views/operate/rectification/surveyList/components/viewInterface/index.vue @@ -1,246 +1,272 @@ <template> - <div class="createmyInterface"> - <main> - <div class="mainContent"> - <el-form ref="user" label-width="140px" autoComplete="on" :model="myInterface" - :rules="createmyInterfaceRules" label-position="right"> - <!-- 搴旂敤鍚嶇О --> - <el-form-item label="搴旂敤鍚嶇О:" prop="applicationName"> - <el-input v-model="myInterface.applicationName" placeholder="濉啓搴旂敤鍚嶇О"></el-input> - </el-form-item> - <!-- 搴旂敤鍥炬爣 --> - <el-form-item label="搴旂敤鍥炬爣:" prop="applicationIconUrl"> - <div class="iconBox"> - <div class="upload"> - <img src="@/assets/imgs/user/default-avatar.jpg" alt=""> - </div> - <div class="iconView"> - <span>绀烘剰鍥�</span> - <img src="@/assets/imgs/user/default-avatar.jpg" alt=""> - </div> - <div class="tip"> - <span>鍙厑璁镐笂浼爅pg,jpeg,png,svg鏍煎紡鐨勫浘鐗囷紝寤鸿灏哄涓�105px*105px</span> - </div> - </div> - </el-form-item> - <!-- 搴旂敤绫诲瀷 --> - <el-form-item label="搴旂敤绫诲瀷:" prop="applicationType"> - <div class="optionItem"> - <el-radio-group v-model="myInterface.applicationType"> - <el-radio :label="1">缃戦〉搴旂敤</el-radio> - </el-radio-group> - </div> - </el-form-item> - <!--缃戠珯url --> - <el-form-item label="缃戠珯url:" prop="websiteUrl"> - <el-input v-model="myInterface.websiteUrl"></el-input> - </el-form-item> - <!-- 搴旂敤鎻忚堪 --> - <el-form-item label="搴旂敤鎻忚堪:" prop="description"> - <el-input v-model="myInterface.description" placeholder="璇峰~鍐欐弿杩�"></el-input> - </el-form-item> - <!-- 鎸夐挳 --> - <!-- <el-form-item> - <div class="optionBtn"> - <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">鎻愪氦 - </el-button> - <el-button class="btn reset">閲嶇疆</el-button> - </div> - </el-form-item> --> - </el-form> - </div> - </main> - </div> + <div class="createmyInterface"> + <main> + <div class="mainContent"> + <el-form + ref="user" + label-width="140px" + autoComplete="on" + :model="myInterface" + :rules="createUserRules" + label-position="right" + > + <el-form-item class="optionItem" label="浠诲姟缂栧彿:" prop="num"> + <el-input + v-model="myInterface.num" + placeholder="璇峰~鍐欎换鍔$紪鍙�" + disabled + ></el-input> + </el-form-item> + <el-form-item class="optionItem" label="闂绫诲瀷:" prop="type"> + <el-input + v-model="myInterface.type" + placeholder="璇烽�夋嫨闂绫诲瀷" + disabled + ></el-input> + </el-form-item> + <el-form-item class="optionItem" label="澶х被:" prop="bigclass"> + <el-input + v-model="myInterface.bigclass" + placeholder="璇烽�夋嫨澶х被" + disabled + ></el-input> + </el-form-item> + <el-form-item class="optionItem" label="灏忕被:" prop="subclass"> + <el-input + v-model="myInterface.subclass" + placeholder="璇烽�夋嫨灏忕被" + disabled + ></el-input> + </el-form-item> + <el-form-item class="optionItem" label="琛楅亾:" prop="street"> + <el-input + v-model="myInterface.street" + placeholder="璇峰~鍐欒閬�" + disabled + ></el-input> + </el-form-item> + <el-form-item class="optionItem" label="绀惧尯:" prop="community"> + <el-input + v-model="myInterface.community" + placeholder="璇峰~鍐欑ぞ鍖�" + disabled + ></el-input> + </el-form-item> + <el-form-item class="optionItem" label="浠诲姟鎻忚堪:" prop="task"> + <el-input + v-model="myInterface.task" + placeholder="璇峰~鍐欎换鍔℃弿杩�" + disabled + ></el-input> + </el-form-item> + <el-form-item class="optionItem" label="涓婃姤鏃堕棿:" prop="reportTime"> + <el-input + v-model="myInterface.reportTime" + placeholder="璇烽�夋嫨涓婃姤鏃堕棿" + disabled + ></el-input> + </el-form-item> + </el-form> + </div> + </main> + </div> </template> <script> export default { - data() { - const validateApplicationName = (rule, value, callback) => { - if (!value) { - callback(new Error("璇峰~鍐欑敤鎴峰悕绉�")); - } - }; - const validateApplicationIconUrl = (rule, value, callback) => { - if (!value) { - callback(new Error("璇峰~鍐欑櫥褰曞瘑鐮�")); - } else { - const rep = /^\w+$/; - if (!rep.test(value)) { - callback(new Error("瀵嗙爜鍙兘鏄互鏁板瓧銆�26涓嫳鏂囧瓧姣嶆垨鑰呬笅鍒掔嚎缁勬垚鐨勫瓧绗︿覆")); - } - } - }; - const validateApplicationType = (rule, value, callback) => { - if (!value) { - callback(new Error("璇峰~鍐欑敤鎴峰鍚�")); - } else { - const rep = /^[\u4E00-\u9FA5]{2,4}$/; - if (!rep.test(value)) { - callback("璇疯緭鍏ユ纭殑鐢ㄦ埛濮撳悕"); - } - } - }; - const validatePhone = (rule, value, callback) => { - if (!value) { - callback(new Error("璇峰~鍐欐墜鏈哄彿鐮�")); - } else { - const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/ - if (!rep.test(value)) { - callback("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜"); - } - } - }; - return { - myInterface: { - }, - createmyInterfaceRules: { - applicationName: [ - { required: true, trigger: "blur", validator: validateApplicationName}, - ], - applicationIconUrl: [ - { required: true, trigger: "blur", validator: validateApplicationIconUrl }, - ], - applicationType: [ - { required: true, trigger: "blur", validator: validateApplicationType }, - ], - websiteUrl: [ - { required: true, trigger: "blur" }, - ], - description: [ - { required: false, trigger: "blur" }, - ], - }, + data() { + const validateApplicationName = (rule, value, callback) => { + if (!value) { + callback(new Error("璇峰~鍐欑敤鎴峰悕绉�")); + } + }; + const validateApplicationIconUrl = (rule, value, callback) => { + if (!value) { + callback(new Error("璇峰~鍐欑櫥褰曞瘑鐮�")); + } else { + const rep = /^\w+$/; + if (!rep.test(value)) { + callback( + new Error("瀵嗙爜鍙兘鏄互鏁板瓧銆�26涓嫳鏂囧瓧姣嶆垨鑰呬笅鍒掔嚎缁勬垚鐨勫瓧绗︿覆") + ); } - }, - created() { - const that = this; - const {userInfo} = this; - this.myInterface = JSON.parse(JSON.stringify(userInfo)); - }, - methods: { - }, - props: ['updateFlag','userInfo'] -} + } + }; + const validateApplicationType = (rule, value, callback) => { + if (!value) { + callback(new Error("璇峰~鍐欑敤鎴峰鍚�")); + } else { + const rep = /^[\u4E00-\u9FA5]{2,4}$/; + if (!rep.test(value)) { + callback("璇疯緭鍏ユ纭殑鐢ㄦ埛濮撳悕"); + } + } + }; + const validatePhone = (rule, value, callback) => { + if (!value) { + callback(new Error("璇峰~鍐欐墜鏈哄彿鐮�")); + } else { + const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/; + if (!rep.test(value)) { + callback("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜"); + } + } + }; + return { + myInterface: {}, + createmyInterfaceRules: { + applicationName: [ + { + required: true, + trigger: "blur", + validator: validateApplicationName, + }, + ], + applicationIconUrl: [ + { + required: true, + trigger: "blur", + validator: validateApplicationIconUrl, + }, + ], + applicationType: [ + { + required: true, + trigger: "blur", + validator: validateApplicationType, + }, + ], + websiteUrl: [{ required: true, trigger: "blur" }], + description: [{ required: false, trigger: "blur" }], + }, + }; + }, + created() { + const that = this; + const { userInfo } = this; + this.myInterface = JSON.parse(JSON.stringify(userInfo)); + }, + methods: {}, + props: ["updateFlag", "userInfo"], +}; </script> <style lang="scss" scoped> .createmyInterface { - border-radius: 1px; + border-radius: 1px; + background-color: #09152f; + + main { + text-align: left; + padding: 0 55px; background-color: #09152f; - main { - text-align: left; - padding: 0 55px; - background-color: #09152f; + .mainContent { + display: flex; + justify-content: center; + padding-top: 50px; - .mainContent { - display: flex; - justify-content: center; - padding-top: 50px; - - .iconBox { - display: flex; - - .upload { - display: flex; - align-items: flex-end; - - img { - width: 120px; - height: 120px; - border-radius: 4px; - } - } - - .iconView { - display: flex; - flex-direction: column; - margin-left: 30px; - justify-content: flex-end; - - img { - width: 70px; - height: 70px; - border-radius: 4px; - } - } - - .tip { - display: flex; - align-items: flex-end; - margin-left: 30px; - font-size: 12px; - - span { - line-height: 20px; - } - } - } - .optionBtn{ - &::v-deep .el-button{ - padding: 12px 40px; - } - .reset{ - border: 1px solid #0079fe; - color: #0079fe; - } - } - &::v-deep .el-form-item__label { - color: #4b9bb7; - } - - &::v-deep .el-input__inner { - background-color: #09152f; - border: 1px solid #17324c; - } - - .addPerson { - display: flex; - list-style: none; - padding: 0; - - li { - background-color: #cccccc; - width: 36px; - height: 36px; - border-radius: 50%; - color: #fff; - text-align: center; - font-size: 30px; - margin-left: 10px; - } - } - - .el-form-item__content { - width: 400px; - - .el-select { - width: 100%; - } - } - - .optionHandleSp { - display: flex; - - .areaNumber, - .moreNumber { - flex: 1; - } - - .telNumber { - flex: 2; - } - } - - } - } - - footer { - border-top: 1px solid #fff; - height: 80px; + .iconBox { display: flex; - align-items: center; - justify-content: flex-end; - padding-right: 20px; + + .upload { + display: flex; + align-items: flex-end; + + img { + width: 120px; + height: 120px; + border-radius: 4px; + } + } + + .iconView { + display: flex; + flex-direction: column; + margin-left: 30px; + justify-content: flex-end; + + img { + width: 70px; + height: 70px; + border-radius: 4px; + } + } + + .tip { + display: flex; + align-items: flex-end; + margin-left: 30px; + font-size: 12px; + + span { + line-height: 20px; + } + } + } + .optionBtn { + &::v-deep .el-button { + padding: 12px 40px; + } + .reset { + border: 1px solid #0079fe; + color: #0079fe; + } + } + &::v-deep .el-form-item__label { + color: #4b9bb7; + } + + &::v-deep .el-input__inner { + background-color: #09152f; + border: 1px solid #17324c; + } + + .addPerson { + display: flex; + list-style: none; + padding: 0; + + li { + background-color: #cccccc; + width: 36px; + height: 36px; + border-radius: 50%; + color: #fff; + text-align: center; + font-size: 30px; + margin-left: 10px; + } + } + + .el-form-item__content { + width: 400px; + + .el-select { + width: 100%; + } + } + + .optionHandleSp { + display: flex; + + .areaNumber, + .moreNumber { + flex: 1; + } + + .telNumber { + flex: 2; + } + } } + } + + footer { + border-top: 1px solid #fff; + height: 80px; + display: flex; + align-items: center; + justify-content: flex-end; + padding-right: 20px; + } } </style> \ No newline at end of file -- Gitblit v1.8.0