Commit f424adfb authored by 罗林杰's avatar 罗林杰

修改缓存初始化

parent d3de17f5
......@@ -85,3 +85,11 @@ export function selectDictType(dictType) {
method: 'get'
})
}
// 初始化
export function refresh() {
return request({
url: '/dataDict/refresh',
method: 'get'
})
}
......@@ -88,7 +88,13 @@
:size="commonField.smallSize"
@click="handleExport"
>{{ commonField.exportName }}</el-button>
<el-button
v-hasPermi="hasDictAddPerm"
:class="commonField.addClass"
:type="commonField.typePrimary"
:size="commonField.smallSize"
@click="handleLoad"
>缓存初始化</el-button>
</div>
</el-form>
</div>
......@@ -211,14 +217,15 @@
</template>
<script>
import { listType,
import {
listType,
getType,
delType,
addType,
updateType,
exportType,
clearCache,
selectDictType
selectDictType, refresh
} from '@/api/system/dict/type'
import Coolbutton from '@/components/coolbutton'
import { getDataCache, setDataCache } from '@/assets/js/filterData'
......@@ -380,6 +387,15 @@ export default {
this.open = false
this.reset()
},
handleLoad() {
refresh().then(() => {
this.$message({
message: '初始化成功',
type: 'success'
})
this.getList()
})
},
// 表单重置
reset() {
this.form = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment