|
@@ -17,7 +17,6 @@
|
|
|
<el-form class="secLine">
|
|
|
<el-form-item>
|
|
|
<el-button size="mini" @click="addRule" type="warning" style="margin:0 10px">+ 新增药品</el-button>
|
|
|
- <el-button size="mini" @click="update">更新数据</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-form>
|
|
@@ -254,29 +253,6 @@ export default {
|
|
|
company: ''
|
|
|
};
|
|
|
},
|
|
|
- update() {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: 'Loading',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
- });
|
|
|
- api
|
|
|
- .getPageList()
|
|
|
- .then(res => {
|
|
|
- loading.close();
|
|
|
- if (res.data.code == '0') {
|
|
|
- this.warning('更新成功', 'success');
|
|
|
- this.getDataList();
|
|
|
- } else {
|
|
|
- this.warning(res.data.msg || '更新失败,请重试');
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- loading.close();
|
|
|
- this.warning('更新失败,请重试');
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|