Merge branch 'master' of http://yun.pashanhoo.com:9090/renchao/CadastralSystem
Showing
2 changed files
with
191 additions
and
4 deletions
| ... | @@ -20,4 +20,15 @@ export function getErrorLog() { | ... | @@ -20,4 +20,15 @@ export function getErrorLog() { |
| 20 | url: '/system/manage/getErrorLog', | 20 | url: '/system/manage/getErrorLog', |
| 21 | method: 'post', | 21 | method: 'post', |
| 22 | }) | 22 | }) |
| 23 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 23 | } | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 获取所有字典 | ||
| 27 | */ | ||
| 28 | export function getAllDdic(data) { | ||
| 29 | return request({ | ||
| 30 | url: '/system/dictionary/getAllDdic', | ||
| 31 | method: 'post', | ||
| 32 | data: data, | ||
| 33 | }) | ||
| 34 | } | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div class="log-content"> |
| 3 | 字典管理 | 3 | <div class="log-search"> |
| 4 | 字典名称: | ||
| 5 | <el-date-picker | ||
| 6 | v-model="startValue" | ||
| 7 | type="datetime" | ||
| 8 | placeholder="选择日期时间" | ||
| 9 | align="right" | ||
| 10 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 11 | :picker-options="pickerOptions"> | ||
| 12 | </el-date-picker> | ||
| 13 | <el-button type="primary" @click="query">查询</el-button> | ||
| 14 | <el-button type="warning" @click="reset">重置</el-button> | ||
| 15 | <el-button type="info" @click="getError">错误日志</el-button> | ||
| 16 | </div> | ||
| 17 | <div class="log-detail"> | ||
| 18 | <div class="log-menu"> | ||
| 19 | <ul> | ||
| 20 | <li v-for="(it,index) in tableData" :key="index"> | ||
| 21 | <span>{{index}},</span><el-button class="dicText" type="text" @click="showMessage(it.value)">{{it.name}}</el-button> | ||
| 22 | </li> | ||
| 23 | </ul> | ||
| 24 | </div> | ||
| 25 | <div class="log-table"> | ||
| 26 | <!-- <el-table :data="concreteDic">--> | ||
| 27 | <el-table | ||
| 28 | :data="concreteDic" | ||
| 29 | style="width: 100%;margin-bottom: 20px;" | ||
| 30 | row-key="bsm" | ||
| 31 | border | ||
| 32 | :default-expand-all="false" | ||
| 33 | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> | ||
| 34 | <el-table-column prop="mc" align="center" label="名称"> | ||
| 35 | </el-table-column> | ||
| 36 | <el-table-column prop="dm" align="center" label="代码"> | ||
| 37 | </el-table-column> | ||
| 38 | <el-table-column prop="sxh" align="center" label="顺序号"> | ||
| 39 | </el-table-column> | ||
| 40 | <el-table-column prop="bz" align="center" label="备注"> | ||
| 41 | </el-table-column> | ||
| 42 | <el-table-column align="center" label="操作"> | ||
| 43 | <el-button type="text" class="operatorBtn">编辑</el-button> | ||
| 44 | <el-button type="text" class="operatorBtn">删除</el-button> | ||
| 45 | <el-button type="text" class="operatorBtn">添加</el-button> | ||
| 46 | </el-table-column> | ||
| 47 | </el-table> | ||
| 48 | </div> | ||
| 49 | </div> | ||
| 4 | </div> | 50 | </div> |
| 5 | </template> | 51 | </template> |
| 6 | 52 | ||
| 7 | <script> | 53 | <script> |
| 54 | import {getAllDdic} from "@api/manage"; | ||
| 8 | export default { | 55 | export default { |
| 9 | name: "index" | 56 | name: "index", |
| 57 | data(){ | ||
| 58 | return{ | ||
| 59 | tableData:[], | ||
| 60 | errorLog:[], | ||
| 61 | concreteDic:'', | ||
| 62 | |||
| 63 | outerVisible: false, | ||
| 64 | innerVisible: false, | ||
| 65 | |||
| 66 | pickerOptions: { | ||
| 67 | shortcuts: [{ | ||
| 68 | text: '今天', | ||
| 69 | onClick(picker) { | ||
| 70 | picker.$emit('pick', new Date()); | ||
| 71 | } | ||
| 72 | }, { | ||
| 73 | text: '昨天', | ||
| 74 | onClick(picker) { | ||
| 75 | const date = new Date(); | ||
| 76 | date.setTime(date.getTime() - 3600 * 1000 * 24); | ||
| 77 | picker.$emit('pick', date); | ||
| 78 | } | ||
| 79 | }, { | ||
| 80 | text: '一周前', | ||
| 81 | onClick(picker) { | ||
| 82 | const date = new Date(); | ||
| 83 | date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); | ||
| 84 | picker.$emit('pick', date); | ||
| 85 | } | ||
| 86 | }] | ||
| 87 | }, | ||
| 88 | startValue: '', | ||
| 89 | endValue:'', | ||
| 90 | |||
| 91 | } | ||
| 92 | }, | ||
| 93 | methods:{ | ||
| 94 | getData(){ | ||
| 95 | let data={ | ||
| 96 | "mc": "", | ||
| 97 | "pbsm": "" | ||
| 98 | }; | ||
| 99 | getAllDdic(data).then((res)=>{ | ||
| 100 | console.log(res.result); | ||
| 101 | this.tableData = res.result; | ||
| 102 | if(this.tableData.length>0){ | ||
| 103 | this.concreteDic = this.tableData[0].value; | ||
| 104 | } | ||
| 105 | }) | ||
| 106 | }, | ||
| 107 | showMessage(data){ | ||
| 108 | this.concreteDic = data; | ||
| 109 | }, | ||
| 110 | query(){ | ||
| 111 | let data={ | ||
| 112 | "mc": "", | ||
| 113 | "pbsm": "" | ||
| 114 | }; | ||
| 115 | getAllDdic(data).then((res)=>{ | ||
| 116 | console.log(res.result); | ||
| 117 | this.tableData = res.result; | ||
| 118 | }) | ||
| 119 | }, | ||
| 120 | reset(){ | ||
| 121 | this.startValue = ""; | ||
| 122 | this.endValue = ""; | ||
| 123 | } | ||
| 124 | }, | ||
| 125 | mounted() { | ||
| 126 | this.getData(); | ||
| 127 | } | ||
| 10 | } | 128 | } |
| 11 | </script> | 129 | </script> |
| 12 | 130 | ||
| 13 | <style scoped> | 131 | <style scoped> |
| 132 | .log-content{ | ||
| 133 | width: 100%; | ||
| 134 | /*border: 1px solid red;*/ | ||
| 135 | } | ||
| 136 | .log-search{ | ||
| 137 | margin-top: 10px; | ||
| 138 | padding-left: 15px; | ||
| 139 | padding-top: 20px; | ||
| 140 | width: 100%; | ||
| 141 | border: 1px solid #a8adad; | ||
| 142 | height: 60px; | ||
| 143 | background-color: white; | ||
| 144 | } | ||
| 145 | .log-detail{ | ||
| 146 | margin-top: 10px; | ||
| 147 | width: 100%; | ||
| 148 | border: 1px solid #a8adad; | ||
| 149 | height: 900px; | ||
| 150 | overflow: scroll; | ||
| 151 | background-color: white; | ||
| 152 | } | ||
| 153 | |||
| 154 | .log-menu{ | ||
| 155 | width: 17%; | ||
| 156 | float: left; | ||
| 157 | height: 900px; | ||
| 158 | overflow: scroll; | ||
| 159 | border-right: 1px solid #a8adad; | ||
| 160 | } | ||
| 161 | |||
| 162 | .log-table{ | ||
| 163 | width: 81%; | ||
| 164 | float: right; | ||
| 165 | height: 900px; | ||
| 166 | overflow: scroll; | ||
| 167 | } | ||
| 168 | |||
| 169 | .el-button { | ||
| 170 | width: 100px; | ||
| 171 | margin-left: 15px; | ||
| 172 | } | ||
| 173 | |||
| 174 | ul{ | ||
| 175 | list-style-type: circle; | ||
| 176 | } | ||
| 177 | li{ | ||
| 178 | display:block; | ||
| 179 | margin:10px; | ||
| 180 | } | ||
| 181 | |||
| 182 | .dicText{ | ||
| 183 | text-align: left; | ||
| 184 | } | ||
| 185 | |||
| 186 | .operatorBtn{ | ||
| 187 | width: 20px; | ||
| 188 | } | ||
| 189 | |||
| 14 | 190 | ||
| 15 | </style> | 191 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment