Commit 9913f6564c1eb8592029ac4966bb6b1306e15c6b
1 parent
be009217
巡查上报
Showing
4 changed files
with
98 additions
and
66 deletions
src/components/SelsctLoad/index.vue
| ... | ... | @@ -7,13 +7,14 @@ |
| 7 | 7 | clearable |
| 8 | 8 | reserve-keyword |
| 9 | 9 | placeholder="请输入关平台名称" |
| 10 | - :remote-method="search" | |
| 11 | 10 | v-loadMore="nextList" |
| 12 | - :loading="loading" | |
| 13 | - @change="onChange" | |
| 11 | + @select="onChange" | |
| 12 | + @blur="onInput" | |
| 14 | 13 | @clear="clearHandle" |
| 15 | 14 | @focus="search" |
| 15 | + :loading="loading && !this.options.length" | |
| 16 | 16 | > |
| 17 | + <!-- :remote-method="search" :loading="loading" --> | |
| 17 | 18 | <el-option |
| 18 | 19 | v-for="item in options" |
| 19 | 20 | :key="item.value" |
| ... | ... | @@ -54,20 +55,12 @@ export default { |
| 54 | 55 | }, |
| 55 | 56 | nextList() { |
| 56 | 57 | if (this.loading || this.noMore) return; |
| 57 | - this.searchList.pageIndex++; | |
| 58 | - getInfoList({ ...this.searchList, keyword: query }).then(({ data }) => { | |
| 59 | - let list = []; | |
| 60 | - data.list.length && | |
| 61 | - data.list.forEach((item) => { | |
| 62 | - list.push({ | |
| 63 | - label: item.SysytemInfo.SystemName, | |
| 64 | - value: item.SysytemInfo.Id, | |
| 65 | - }); | |
| 66 | - }); | |
| 67 | - this.options = [...this.options, ...list]; | |
| 68 | - }); | |
| 58 | + this.searchList.pageIndex += 1; | |
| 59 | + this.$nextTick(() => { | |
| 60 | + this.loadList(); | |
| 61 | + }) | |
| 69 | 62 | }, |
| 70 | - search(query) { | |
| 63 | + search() { | |
| 71 | 64 | this.options = []; |
| 72 | 65 | this.searchList = { |
| 73 | 66 | pageIndex: 1, |
| ... | ... | @@ -75,11 +68,11 @@ export default { |
| 75 | 68 | sort: "desc", |
| 76 | 69 | sidx: "", |
| 77 | 70 | }; |
| 78 | - this.loadList(query); | |
| 71 | + this.loadList(); | |
| 79 | 72 | }, |
| 80 | - loadList(query) { | |
| 73 | + loadList() { | |
| 81 | 74 | this.loading = true; |
| 82 | - getInfoList({ ...this.searchList, keyword: query }).then(({ data }) => { | |
| 75 | + getInfoList({ ...this.searchList, keyword: this.value }).then(({ data }) => { | |
| 83 | 76 | let list = []; |
| 84 | 77 | data.list.length && |
| 85 | 78 | data.list.forEach((item) => { |
| ... | ... | @@ -105,6 +98,11 @@ export default { |
| 105 | 98 | this.$emit("input", this.options.map((item) => item.value == v).label); |
| 106 | 99 | this.$emit("change", v); |
| 107 | 100 | }, |
| 101 | + | |
| 102 | + onInput(e) { | |
| 103 | + this.$emit("input", e.target.value); | |
| 104 | + this.$emit("change", e.target.value); | |
| 105 | + } | |
| 108 | 106 | }, |
| 109 | 107 | watch: { |
| 110 | 108 | value(val) { | ... | ... |
src/filters/index.js
| ... | ... | @@ -162,6 +162,26 @@ export function dynamicText(value, options) { |
| 162 | 162 | if (!item || !item.fullName) return value |
| 163 | 163 | return item.fullName |
| 164 | 164 | } |
| 165 | +export function dynamicTextUP(value, options) { | |
| 166 | + if (!value) return '' | |
| 167 | + if (Array.isArray(value)) { | |
| 168 | + if (!options || !Array.isArray(options)) return value.join() | |
| 169 | + let textList = [] | |
| 170 | + for (let i = 0; i < value.length; i++) { | |
| 171 | + let item = options.filter(o => o.id == value[i])[0] | |
| 172 | + if (!item || !item.fullName) { | |
| 173 | + textList.push(value[i]) | |
| 174 | + } else { | |
| 175 | + textList.push(item.fullName) | |
| 176 | + } | |
| 177 | + } | |
| 178 | + return textList.join() | |
| 179 | + } | |
| 180 | + if (!options || !Array.isArray(options)) return value | |
| 181 | + let item = options.filter(o => o.Id == value)[0] | |
| 182 | + if (!item || !item.FullName) return value | |
| 183 | + return item.FullName | |
| 184 | +} | |
| 165 | 185 | // 代码生成器数据匹配 Code |
| 166 | 186 | export function dynamicTextCode(value, options) { |
| 167 | 187 | ... | ... |
src/views/baseSystemInfo/InspectForm.vue
| ... | ... | @@ -17,40 +17,37 @@ |
| 17 | 17 | :disabled="!!isDetail" |
| 18 | 18 | :rules="rules" |
| 19 | 19 | > |
| 20 | - <el-col :span="24"> | |
| 21 | - <el-form-item label="平台名称" prop="platformName"> | |
| 22 | - <SelsctLoad v-model="dataForm.platformName"/> | |
| 23 | - <!-- <el-input | |
| 24 | - v-model="dataForm.platformName" | |
| 25 | - placeholder="请输入" | |
| 20 | + <el-col :span="24"> | |
| 21 | + <el-form-item label="问题来源" prop="platformName"> | |
| 22 | + <el-input | |
| 23 | + v-model="dataForm.questionFrom" | |
| 24 | + placeholder="请输入问题来源" | |
| 26 | 25 | clearable |
| 27 | 26 | :style="{ width: '100%' }" |
| 28 | - :disabled="true" | |
| 29 | 27 | > |
| 30 | - </el-input> --> | |
| 28 | + </el-input> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="24"> | |
| 32 | + <el-form-item label="平台名称" prop="platformName"> | |
| 33 | + <SelsctLoad v-model="dataForm.platformName" :disabled="true"/> | |
| 31 | 34 | </el-form-item> |
| 32 | 35 | </el-col> |
| 33 | 36 | <el-col :span="24"> |
| 34 | 37 | <el-form-item label="平台类型" prop="platformType"> |
| 35 | - <el-select | |
| 36 | - v-model="dataForm.platformType" | |
| 37 | - placeholder="请选择" | |
| 38 | - clearable | |
| 39 | - :style="{ width: '100%' }" | |
| 40 | - :disabled="true" | |
| 41 | - > | |
| 42 | - <el-option | |
| 38 | + <el-radio-group v-model="dataForm.platformType" :disabled="true"> | |
| 39 | + <el-radio | |
| 43 | 40 | v-for="(item, index) in platformTypeOptions" |
| 44 | 41 | :key="index" |
| 45 | - :label="item.FullName" | |
| 46 | - :value="item.Id" | |
| 47 | - ></el-option> | |
| 48 | - </el-select> | |
| 42 | + :label="item.Id" | |
| 43 | + >{{ item.FullName }}</el-radio | |
| 44 | + > | |
| 45 | + </el-radio-group> | |
| 49 | 46 | </el-form-item> |
| 50 | 47 | </el-col> |
| 51 | 48 | <el-col :span="24"> |
| 52 | 49 | <el-form-item label="问题类型" prop="questionType"> |
| 53 | - <el-radio-group v-model="dataForm.questionType" :style="{}"> | |
| 50 | + <el-radio-group v-model="dataForm.questionType"> | |
| 54 | 51 | <el-radio |
| 55 | 52 | v-for="(item, index) in questionTypeOptions" |
| 56 | 53 | :key="index" |
| ... | ... | @@ -61,7 +58,7 @@ |
| 61 | 58 | </el-form-item> |
| 62 | 59 | </el-col> |
| 63 | 60 | <el-col :span="24"> |
| 64 | - <el-form-item label="问题分类" prop="questionClass"> | |
| 61 | + <el-form-item label="关键词" prop="questionClass"> | |
| 65 | 62 | <el-select |
| 66 | 63 | v-model="dataForm.questionClass" |
| 67 | 64 | placeholder="请选择" |
| ... | ... | @@ -101,22 +98,32 @@ |
| 101 | 98 | </el-input> |
| 102 | 99 | </el-form-item> |
| 103 | 100 | </el-col> |
| 104 | - <el-col :span="24"> | |
| 105 | - <el-form-item label="取证内容" prop="obtainEvidence"> | |
| 106 | - <NCC-UploadFz | |
| 107 | - v-model="dataForm.obtainEvidence" | |
| 108 | - :fileSize="5" | |
| 109 | - sizeUnit="MB" | |
| 110 | - :limit="9" | |
| 111 | - buttonText="点击上传" | |
| 101 | + <el-col :span="12"> | |
| 102 | + <el-form-item label="正确描述" prop="platformName"> | |
| 103 | + <el-input | |
| 104 | + v-model="dataForm.platformName" | |
| 105 | + placeholder="请输入正确描述" | |
| 106 | + clearable | |
| 107 | + :style="{ width: '100%' }" | |
| 112 | 108 | > |
| 113 | - </NCC-UploadFz> | |
| 109 | + </el-input> | |
| 110 | + </el-form-item> | |
| 111 | + </el-col> | |
| 112 | + <el-col :span="12"> | |
| 113 | + <el-form-item label="错误描述" prop="platformName"> | |
| 114 | + <el-input | |
| 115 | + v-model="dataForm.platformName" | |
| 116 | + placeholder="请输入错误描述" | |
| 117 | + clearable | |
| 118 | + :style="{ width: '100%' }" | |
| 119 | + > | |
| 120 | + </el-input> | |
| 114 | 121 | </el-form-item> |
| 115 | 122 | </el-col> |
| 116 | 123 | <el-col :span="24"> |
| 117 | - <el-form-item label="附件上传" prop="annex"> | |
| 124 | + <el-form-item label="取证内容" prop="obtainEvidence"> | |
| 118 | 125 | <NCC-UploadFz |
| 119 | - v-model="dataForm.annex" | |
| 126 | + v-model="dataForm.obtainEvidence" | |
| 120 | 127 | :fileSize="5" |
| 121 | 128 | sizeUnit="MB" |
| 122 | 129 | :limit="9" |
| ... | ... | @@ -148,6 +155,9 @@ export default { |
| 148 | 155 | visible: false, |
| 149 | 156 | isDetail: false, |
| 150 | 157 | dataForm: { |
| 158 | + id: "", | |
| 159 | + id: undefined, | |
| 160 | + questionFrom: undefined, | |
| 151 | 161 | platformName: undefined, |
| 152 | 162 | platformType: undefined, |
| 153 | 163 | questionType: undefined, |
| ... | ... | @@ -157,7 +167,17 @@ export default { |
| 157 | 167 | obtainEvidence: [], |
| 158 | 168 | annex: [], |
| 159 | 169 | }, |
| 160 | - rules: {}, | |
| 170 | + rules: { | |
| 171 | + platformType: [ | |
| 172 | + { required: true, message: "请选择平台类型", trigger: "change" }, | |
| 173 | + ], | |
| 174 | + questionType: [ | |
| 175 | + { required: true, message: "请选择问题类型", trigger: "change" }, | |
| 176 | + ], | |
| 177 | + questionClass: [ | |
| 178 | + { required: true, message: "请选择关键词", trigger: "change" }, | |
| 179 | + ], | |
| 180 | + }, | |
| 161 | 181 | sourceOptions: [ |
| 162 | 182 | { fullName: "市网信办线索", id: "市网信办线索" }, |
| 163 | 183 | { fullName: "自主巡查发现", id: "自主巡查发现" }, | ... | ... |
src/views/baseSystemInfo/index.vue
| ... | ... | @@ -99,18 +99,12 @@ |
| 99 | 99 | label="应用名称" |
| 100 | 100 | align="center" |
| 101 | 101 | /> |
| 102 | - <el-table-column | |
| 103 | - show-overflow-tooltip | |
| 104 | - prop="systemType" | |
| 105 | - label="应用类型" | |
| 106 | - align="center" | |
| 107 | - /> | |
| 108 | - <el-table-column | |
| 109 | - show-overflow-tooltip | |
| 110 | - prop="systemClass" | |
| 111 | - label="应用分类" | |
| 112 | - align="center" | |
| 113 | - /> | |
| 102 | + <el-table-column label="应用类型" prop="systemType" align="left" show-overflow-tooltip> | |
| 103 | + <template slot-scope="scope">{{ scope.row.systemType | dynamicTextUP(systemTypeOptions) }}</template> | |
| 104 | + </el-table-column> | |
| 105 | + <el-table-column label="系统类型" prop="systemClass" align="left" show-overflow-tooltip> | |
| 106 | + <!-- <template slot-scope="scope">{{ scope.row.systemClass | dynamicTextUP(systemTypeOptions) }}</template> --> | |
| 107 | + </el-table-column> | |
| 114 | 108 | <el-table-column |
| 115 | 109 | show-overflow-tooltip |
| 116 | 110 | prop="contactUser" |
| ... | ... | @@ -284,8 +278,8 @@ export default { |
| 284 | 278 | }; |
| 285 | 279 | }, |
| 286 | 280 | created() { |
| 287 | - this.initList(); | |
| 288 | 281 | this.initSystemTypeList(); |
| 282 | + this.initList(); | |
| 289 | 283 | }, |
| 290 | 284 | mounted() {}, |
| 291 | 285 | watch: { | ... | ... |