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

修改缓存初始化

parent d3de17f5
...@@ -85,3 +85,11 @@ export function selectDictType(dictType) { ...@@ -85,3 +85,11 @@ export function selectDictType(dictType) {
method: 'get' method: 'get'
}) })
} }
// 初始化
export function refresh() {
return request({
url: '/dataDict/refresh',
method: 'get'
})
}
...@@ -88,7 +88,13 @@ ...@@ -88,7 +88,13 @@
:size="commonField.smallSize" :size="commonField.smallSize"
@click="handleExport" @click="handleExport"
>{{ commonField.exportName }}</el-button> >{{ commonField.exportName }}</el-button>
<el-button
v-hasPermi="hasDictAddPerm"
:class="commonField.addClass"
:type="commonField.typePrimary"
:size="commonField.smallSize"
@click="handleLoad"
>缓存初始化</el-button>
</div> </div>
</el-form> </el-form>
</div> </div>
...@@ -211,14 +217,15 @@ ...@@ -211,14 +217,15 @@
</template> </template>
<script> <script>
import { listType, import {
listType,
getType, getType,
delType, delType,
addType, addType,
updateType, updateType,
exportType, exportType,
clearCache, clearCache,
selectDictType selectDictType, refresh
} from '@/api/system/dict/type' } from '@/api/system/dict/type'
import Coolbutton from '@/components/coolbutton' import Coolbutton from '@/components/coolbutton'
import { getDataCache, setDataCache } from '@/assets/js/filterData' import { getDataCache, setDataCache } from '@/assets/js/filterData'
...@@ -380,6 +387,15 @@ export default { ...@@ -380,6 +387,15 @@ export default {
this.open = false this.open = false
this.reset() this.reset()
}, },
handleLoad() {
refresh().then(() => {
this.$message({
message: '初始化成功',
type: 'success'
})
this.getList()
})
},
// 表单重置 // 表单重置
reset() { reset() {
this.form = { 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