From c50a8b158e31b9157869d28fb90c6f5c840bb05d Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 08 十二月 2023 15:17:55 +0800 Subject: [PATCH] 提交信息 --- src/views/knowledge/education/compilequer/index.vue | 652 +++++++++++++++++++++++++++++------------------------------ 1 files changed, 321 insertions(+), 331 deletions(-) diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue index 3df9ce1..c78fba9 100644 --- a/src/views/knowledge/education/compilequer/index.vue +++ b/src/views/knowledge/education/compilequer/index.vue @@ -23,20 +23,6 @@ label-width="100px" class="demo-ruleForm" > - <el-form-item label="瀹f暀鍚嶇О" prop="name"> - <el-input v-model="ruleForm.name"></el-input> - </el-form-item> - <el-form-item label="瀹f暀褰㈠紡" prop="name"> - <el-select v-model="ruleForm.shape" placeholder="璇烽�夋嫨"> - <el-option - v-for="item in xjxsoptions" - :key="item.value" - :label="item.label" - :value="item.value" - > - </el-option> - </el-select> - </el-form-item> <el-form-item label="瀹f暀鍒嗙被" prop="region"> <el-select v-model="ruleForm.classify" @@ -55,14 +41,123 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="閫傜敤鐤剧梾" prop="sickness"> + <el-form-item label="瀹f暀鏍囬" prop="name"> + <div style="width: 30%"> + <el-input v-model="ruleForm.name"></el-input> + </div> + </el-form-item> + <el-form-item label="閫氱煡鍙橀噺" prop="name"> + <el-row v-for="item in variablelist"> + <el-col :span="4"> + <el-input v-model="item.variable"></el-input> + </el-col> + <el-col :span="8" :offset="1"> + <el-input v-model="item.value"></el-input> + </el-col> + <el-col :span="4" :offset="1"> + <el-button + type="success" + icon="el-icon-plus" + circle + @click="addvariable(item)" + ></el-button> + <el-button + type="danger" + icon="el-icon-delete" + circle + @click="delvariable(item)" + ></el-button> + </el-col> + </el-row> + </el-form-item> + + <el-form-item label="鏂囦欢" prop="sickness"> + <div style="width: 40%"> + <el-upload + class="upload-demo" + action="https://jsonplaceholder.typicode.com/posts/" + :on-change="handleChange" + :file-list="fileList" + > + <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> + <div slot="tip" class="el-upload__tip"> + 鍙兘涓婁紶jpg/png/xsl鏂囦欢锛屼笖涓嶈秴杩�50mb + </div> + </el-upload> + </div> + </el-form-item> + <el-form-item label="鏍囩" prop="desc"> + <div class="xinz-inf"> + <el-tag + :key="tag" + type="success" + v-for="tag in dynamicTags" + closable + :disable-transitions="false" + @close="handleClose(tag)" + > + {{ tag }} + </el-tag> + <el-select + v-model="inputValue" + v-if="inputVisible" + @change="handleInputConfirm" + filterable + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in options" + :key="item.label" + :label="item.label" + :value="item.label" + > + </el-option> + </el-select> + <el-button + v-else + class="button-new-tag" + size="small" + @click="showInput" + >+ 鏂板鏍囩</el-button + > + </div> + </el-form-item> + <el-row :gutter="20"> + <el-col :span="6"> + <el-form-item label="鐗堟湰鍙�" prop="name"> + <el-input v-model="currentVersion"></el-input> </el-form-item + ></el-col> + <el-col :span="9"> + <el-form-item label="鍙敤鐘舵��" prop="region"> + <el-select + v-model="ruleForm.classify" + size="medium" + multiple + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="ruleFormaa" + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> </el-form-item + ></el-col> + </el-row> + <el-form-item label="瀹f暀鏂瑰紡" prop="region"> <el-select - v-model="ruleForm.sickness" + v-model="ruleForm.way" + size="medium" + multiple filterable - placeholder="璇烽�夋嫨" + placeholder="璇烽�夋嫨鍒嗙被" > <el-option - v-for="item in sicknessoptions" + class="ruleFormaa" + v-for="item in xjxsoptions" :key="item.value" :label="item.label" :value="item.value" @@ -70,30 +165,112 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="娲诲姩褰㈠紡" prop="desc"> - <el-input - :rows="4" - type="textarea" - v-model="ruleForm.desc" - maxlength="400" - show-word-limit - ></el-input> + <el-form-item label="閫傜敤鐤剧梾" prop="region"> + <el-select + v-model="ruleForm.illness" + size="medium" + multiple + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="ruleFormaa" + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item label="浣跨敤闄㈠尯" prop="region"> + <el-select + v-model="ruleForm.courtyard" + size="medium" + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="ruleFormaa" + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item label="閫傜敤绉戝" prop="region"> + <el-select + v-model="ruleForm.administrative" + size="medium" + multiple + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="ruleFormaa" + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> </el-form-item> <el-form-item> - <el-button type="success" @click="submitForm('ruleForm')" + <el-button type="success" @click="nextstep('ruleForm')" >涓嬩竴姝�</el-button > <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> + <el-button type="info" @click="closeFm('ruleForm')" + >鍏抽棴</el-button + > </el-form-item> </el-form> </div> <!-- 瀹f暀鍐呭 --> <div v-if="Editprogress == 2"> - <div class="leftvlue-jbxx">瀹f暀鍐呭</div> + <el-row :gutter="20"> + <el-col :span="4"><div class="leftvlue-jbxx">瀹f暀鍐呭</div></el-col> + <el-col :span="12"> + <div> + <el-button @click="laststep('ruleForm')">涓婁竴姝�</el-button> + <el-button type="success" @click="submitForm('ruleForm')" + >淇濆瓨</el-button + > + <el-button type="warning" @click="submitForm('ruleForm')" + >鍙﹀瓨鏂扮増鏈�</el-button + > + <el-button type="info" @click="closeFm('ruleForm')" + >鍏抽棴</el-button + > + </div></el-col + > + </el-row> + <div> - <div> - <el-button @click="openContent" type="primary">鏌ョ湅鍏冪礌</el-button> - </div> + <el-form + :model="ruleForm" + :rules="rules" + ref="ruleForm" + label-width="100px" + class="demo-ruleForm" + > + <el-form-item label="璧勬枡褰㈠紡" prop="region"> + <el-select v-model="ruleForm.shape" placeholder="璇烽�夋嫨鍐呭褰㈠紡"> + <el-option + v-for="item in xjxsoptions" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + </el-form> + </div> + <div> <div id="quillEditorQiniu"> <!-- 鍩轰簬elementUi鐨勪笂浼犵粍浠� el-upload begin--> <el-upload @@ -162,7 +339,21 @@ uploadImgUrl: "/v1/admin/common/upload", uploadUrlPath: "娌℃湁鏂囦欢涓婁紶", quillUpdateImg: false, + fileList: [ + { + name: "food.jpeg", + url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100", + }, + { + name: "food2.jpeg", + url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100", + }, + ], content: "", //鏈�缁堜繚瀛樼殑鍐呭 + dynamicTags: ["鏍囩涓�", "鏍囩浜�", "鏍囩涓�"], + inputVisible: false, + inputValue: "", + // 瀵屾枃鏈� editorOption: { placeholder: "浣犳兂璇翠粈涔堬紵", modules: { @@ -294,292 +485,6 @@ label: "闊抽", }, ], - sicknessoptions: [ - { - value: 1, - label: "楂樿鍘�", - }, - { - value: 2, - label: "蹇冭剰鐥�", - }, - { - value: 3, - label: "绯栧翱鐥�", - }, - { - value: 4, - label: "鑴婃鐐�", - }, - ], - asoptions: [ - { - value: "zhinan", - label: "鎸囧崡", - children: [ - { - value: "shejiyuanze", - label: "璁捐鍘熷垯", - children: [ - { - value: "yizhi", - label: "涓�鑷�", - }, - { - value: "fankui", - label: "鍙嶉", - }, - { - value: "xiaolv", - label: "鏁堢巼", - }, - { - value: "kekong", - label: "鍙帶", - }, - ], - }, - { - value: "daohang", - label: "瀵艰埅", - children: [ - { - value: "cexiangdaohang", - label: "渚у悜瀵艰埅", - }, - { - value: "dingbudaohang", - label: "椤堕儴瀵艰埅", - }, - ], - }, - ], - }, - { - value: "zujian", - label: "缁勪欢", - children: [ - { - value: "basic", - label: "Basic", - children: [ - { - value: "layout", - label: "Layout 甯冨眬", - }, - { - value: "color", - label: "Color 鑹插僵", - }, - { - value: "typography", - label: "Typography 瀛椾綋", - }, - { - value: "icon", - label: "Icon 鍥炬爣", - }, - { - value: "button", - label: "Button 鎸夐挳", - }, - ], - }, - { - value: "form", - label: "Form", - children: [ - { - value: "radio", - label: "Radio 鍗曢�夋", - }, - { - value: "checkbox", - label: "Checkbox 澶氶�夋", - }, - { - value: "input", - label: "Input 杈撳叆妗�", - }, - { - value: "input-number", - label: "InputNumber 璁℃暟鍣�", - }, - { - value: "select", - label: "Select 閫夋嫨鍣�", - }, - { - value: "cascader", - label: "Cascader 绾ц仈閫夋嫨鍣�", - }, - { - value: "switch", - label: "Switch 寮�鍏�", - }, - { - value: "slider", - label: "Slider 婊戝潡", - }, - { - value: "time-picker", - label: "TimePicker 鏃堕棿閫夋嫨鍣�", - }, - { - value: "date-picker", - label: "DatePicker 鏃ユ湡閫夋嫨鍣�", - }, - { - value: "datetime-picker", - label: "DateTimePicker 鏃ユ湡鏃堕棿閫夋嫨鍣�", - }, - { - value: "upload", - label: "Upload 涓婁紶", - }, - { - value: "rate", - label: "Rate 璇勫垎", - }, - { - value: "form", - label: "Form 琛ㄥ崟", - }, - ], - }, - { - value: "data", - label: "Data", - children: [ - { - value: "table", - label: "Table 琛ㄦ牸", - }, - { - value: "tag", - label: "Tag 鏍囩", - }, - { - value: "progress", - label: "Progress 杩涘害鏉�", - }, - { - value: "tree", - label: "Tree 鏍戝舰鎺т欢", - }, - { - value: "pagination", - label: "Pagination 鍒嗛〉", - }, - { - value: "badge", - label: "Badge 鏍囪", - }, - ], - }, - { - value: "notice", - label: "Notice", - children: [ - { - value: "alert", - label: "Alert 璀﹀憡", - }, - { - value: "loading", - label: "Loading 鍔犺浇", - }, - { - value: "message", - label: "Message 娑堟伅鎻愮ず", - }, - { - value: "message-box", - label: "MessageBox 寮规", - }, - { - value: "notification", - label: "Notification 閫氱煡", - }, - ], - }, - { - value: "navigation", - label: "Navigation", - children: [ - { - value: "menu", - label: "NavMenu 瀵艰埅鑿滃崟", - }, - { - value: "tabs", - label: "Tabs 鏍囩椤�", - }, - { - value: "breadcrumb", - label: "Breadcrumb 闈㈠寘灞�", - }, - { - value: "dropdown", - label: "Dropdown 涓嬫媺鑿滃崟", - }, - { - value: "steps", - label: "Steps 姝ラ鏉�", - }, - ], - }, - { - value: "others", - label: "Others", - children: [ - { - value: "dialog", - label: "Dialog 瀵硅瘽妗�", - }, - { - value: "tooltip", - label: "Tooltip 鏂囧瓧鎻愮ず", - }, - { - value: "popover", - label: "Popover 寮瑰嚭妗�", - }, - { - value: "card", - label: "Card 鍗$墖", - }, - { - value: "carousel", - label: "Carousel 璧伴┈鐏�", - }, - { - value: "collapse", - label: "Collapse 鎶樺彔闈㈡澘", - }, - ], - }, - ], - }, - { - value: "ziyuan", - label: "璧勬簮", - children: [ - { - value: "axure", - label: "Axure Components", - }, - { - value: "sketch", - label: "Sketch Templates", - }, - { - value: "jiaohu", - label: "缁勪欢浜や簰鏂囨。", - }, - ], - }, - ], valssu: [ { idd: 1, @@ -607,6 +512,12 @@ userName: "鍥涘彿瀹f暀", }, ], + variablelist: [ + { + variable: "paitent", + value: "琛ㄧず鎮h�呯殑鏍囪瘑", + }, + ], // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, @@ -630,10 +541,8 @@ }, methods: { + // 瀹屾垚 submitForm(formName) { - if (this.Editprogress <= 3) { - return this.Editprogress++; - } this.rules = this.rulesa; // 鎻愪氦 this.$refs[formName].validate((valid) => { @@ -645,6 +554,33 @@ } }); }, + // 涓嬩竴姝� + nextstep() { + if (this.Editprogress <= 1) { + return this.Editprogress++; + } + }, + // 涓婁竴姝� + laststep() { + this.Editprogress = this.Editprogress - 1; + }, + // 鍏抽棴 + closeFm(){ + this.$confirm('閫�鍑轰笉浼氫繚鐣欓〉闈㈠唴瀹规洿鏀�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$router.go(-1) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑�' + }); + }); + }, + // 淇濆瓨棰樼洰淇℃伅 + Saveproblem(){}, /** 鏌ヨ棰樼洰鍒楄〃 */ getList() { // this.loading = true; @@ -659,17 +595,50 @@ // console.log(rows); // this.list = rows; }, - changeaddtopic(val) { - console.log(11); - console.log(val); - this.addvalue = "娣诲姞棰樼洰"; + // 鏂板鍙橀噺 + addvariable() { + this.variablelist.push({ + variable: "", + value: "", + }); }, + // 鍒犻櫎鍙橀噺 + delvariable(item) { + const index = this.variablelist.indexOf(item); + if (index !== -1) { + this.variablelist.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱� + } else { + console.log("鏈壘鍒拌瀵硅薄"); + } + }, + // 鎺у埗鏂囦欢 + handleChange(file, fileList) { + this.fileList = fileList.slice(-3); + }, + // 鏍囩----------------- + handleClose(tag) { + this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); + }, + handleInputConfirm() { + let inputValue = this.inputValue; + if (inputValue) { + this.dynamicTags.push(inputValue); + } + this.inputVisible = false; + this.inputValue = ""; + }, + showInput() { + this.inputVisible = true; + // 鑷姩鑾峰彇鐒︾偣 + // this.$nextTick((_) => { + // this.$refs.saveTagInput.$refs.input.focus(); + // }); + }, + // -------------------------- + // 棰勮妯$増 PreviewTemplate() { this.drawer = true; - }, - laststep() { - this.Editprogress--; }, resetForm(formName) { this.$refs[formName].resetFields(); @@ -723,9 +692,6 @@ uploadResult: function (res) { this.uploadUrlPath = res; }, - openContent: function () { - console.log(this.content); - }, }, }; </script> @@ -778,6 +744,30 @@ cursor: pointer; font-size: 20px; margin: 0 20px; + } +} +.xinz-inf { + font-size: 18px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + line-height: 48px; + + .el-tag + .el-tag { + margin-left: 10px; + } + .button-new-tag { + margin-left: 10px; + height: 32px; + line-height: 30px; + padding-top: 0; + padding-bottom: 0; + } + .input-new-tag { + width: 90px; + margin-left: 10px; + vertical-align: bottom; } } .preview-left { @@ -842,7 +832,7 @@ font-size: 25px; } ::v-deep.el-input--medium { - font-size: 24px !important; + font-size: 18px !important; } ::v-deep.ruleFormaa.el-select { display: inline-block; -- Gitblit v1.9.3