diff --git a/.env.development b/.env.development
index e389b3c..d1ffcc2 100644
--- a/.env.development
+++ b/.env.development
@@ -4,7 +4,7 @@ VUE_APP_TITLE = UDI追溯平台
# 开发环境配置
ENV = 'development'
-VUE_APP_BASE_API = 'http://127.0.0.1:9998'
+VUE_APP_BASE_API = 'http://192.168.0.166:9998'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'
diff --git a/.env.production b/.env.production
index 8a37faf..56cb22d 100644
--- a/.env.production
+++ b/.env.production
@@ -11,7 +11,7 @@ ENV = 'production'
# 线上
VUE_APP_BASE_API = 'https://ts.udims.com/api/'
-VUE_APP_BASE_API = 'http://192.168.0.166:9150/UDI_CPT_SERVER/'
+# VUE_APP_BASE_API = 'http://192.168.0.166:9150/UDI_CPT_SERVER/'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'
diff --git a/src/api/basic/udiInfo.js b/src/api/basic/udiInfo.js
index 4c035ae..1b24a21 100644
--- a/src/api/basic/udiInfo.js
+++ b/src/api/basic/udiInfo.js
@@ -31,6 +31,7 @@ export function filterByVersion(query) {
params: query
});
}
+
export function dlLastVersionByDi(query) {
return axios({
url: "/udiwms/udiinfo/dlLastVersionByDi",
@@ -38,6 +39,7 @@ export function dlLastVersionByDi(query) {
params: query
});
}
+
export function superSearch(query) {
return axios({
url: "/udiwms/udiinfo/superSearch",
@@ -45,3 +47,11 @@ export function superSearch(query) {
params: query
});
}
+
+export function syncOnline(query) {
+ return axios({
+ url: "/udi/udirel/syncOnline",
+ method: "post",
+ data: query
+ });
+}
diff --git a/src/views/basic/product/dict/UdiBasicProductEdit.vue b/src/views/basic/product/dict/UdiBasicProductEdit.vue
index b59f57a..9c4afd8 100644
--- a/src/views/basic/product/dict/UdiBasicProductEdit.vue
+++ b/src/views/basic/product/dict/UdiBasicProductEdit.vue
@@ -546,6 +546,37 @@
+
+
+ 版本信息
+
+
+
+
+
+
+
+ 更新为当前发布版本
+
+
+
+
+
+
@@ -561,7 +592,7 @@
type="primary"
size="small"
icon="search"
- @click="cancelDialog"
+ @click="cancelDialog()"
>取消
@@ -572,6 +603,7 @@
import {filterByUuid, updateRel} from "@/api/basic/udiRlCompany";
import {editDict} from "@/api/basic/UdiBasic";
+import {dlLastVersionByDi, syncOnline} from "@/api/basic/udiInfo";
export default {
name: "UdiBasicProductEdit",
@@ -593,6 +625,7 @@ export default {
return {
sysList: [],
detailList: [],
+ updateLoading: false,
}
},
methods: {
@@ -632,17 +665,47 @@ export default {
this.cancelDialog();
});
},
+ updateVersion() {
+ this.$confirm("此操作将访问国家库查询最新版本信息, 是否继续?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.updateLoading = true;
+ let query = {
+ uuid: this.detailQuery.uuid,
+ originUuid: this.detailQuery.originUuid,
+ };
+ syncOnline(query)
+ .then((response) => {
+ this.updateLoading = false;
+ if (response.code == 20000) {
+ this.$message.success("更新成功!");
+ this.closeDialog();
+ } else {
+ this.$message.error(response.message);
+ }
+ })
+ .catch(() => {
+ this.updateLoading = false;
+ this.total = 0;
+ });
+ })
+ .catch(() => {
+ });
-
+ },
cancelDialog() {
this.closeDialog();
},
},
+
+
created() {
this.getDetailList(this.detailQuery.id);
}
}
-