diff --git a/src/icons/svg/导出.svg b/src/icons/svg/导出.svg
new file mode 100644
index 0000000..1dab8db
--- /dev/null
+++ b/src/icons/svg/导出.svg
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/src/icons/svg/转让状态.svg b/src/icons/svg/转让状态.svg
new file mode 100644
index 0000000..3cc7cb7
--- /dev/null
+++ b/src/icons/svg/转让状态.svg
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/src/mixins/basic-add.js b/src/mixins/basic-add.js
new file mode 100644
index 0000000..6ebc3ad
--- /dev/null
+++ b/src/mixins/basic-add.js
@@ -0,0 +1,96 @@
+/*
+ * @Author: zwq
+ * @Date: 2022-08-24 11:19:43
+ * @LastEditors: zwq
+ * @LastEditTime: 2022-08-26 15:38:58
+ * @Description:
+ */
+export default {
+ data() {
+ /* eslint-disable */
+ return {
+ urlOptions: {
+ submitURL: '',
+ infoURL: '',
+ getOption: false,
+ optionArrUrl: [],
+ optionArr: {}
+ },
+ visible: false,
+ setData:false
+ }
+ },
+ created() {
+ },
+ activated() {
+ },
+ methods: {
+ init(id) {
+ this.dataForm.id = id || "";
+ this.visible = true;
+ if (this.urlOptions.getOption) {
+ this.getArr()
+ }
+ this.$nextTick(() => {
+ this.$refs["dataForm"].resetFields();
+ if (this.dataForm.id) {
+ this.$http
+ .get(`${this.urlOptions.infoURL}/${this.dataForm.id}`)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.dataForm = res.data;
+ if(this.setData){
+ this.setDataForm()
+ }
+ })
+ .catch(() => { });
+ }
+ });
+ },
+ getArr() {
+ this.urlOptions.optionArrUrl.forEach((item, index) => {
+ this.$http
+ .get(item, {
+ params: {
+ page: 1,
+ limit: 500,
+ },
+ })
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.$set(this.urlOptions.optionArr, `arr${index}`, res.data.list)
+ })
+ .catch(() => {
+ });
+ });
+ },
+ // 表单提交
+ dataFormSubmit() {
+ this.$refs["dataForm"].validate((valid) => {
+ if (!valid) {
+ return false;
+ }
+ this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.$message({
+ message: this.$t("prompt.success"),
+ type: "success",
+ duration: 500,
+ onClose: () => {
+ this.visible = false;
+ this.$emit("refreshDataList");
+ },
+ });
+ })
+ .catch(() => { });
+ });
+ },
+ }
+}
\ No newline at end of file
diff --git a/src/mixins/basic-page.js b/src/mixins/basic-page.js
new file mode 100644
index 0000000..8000526
--- /dev/null
+++ b/src/mixins/basic-page.js
@@ -0,0 +1,156 @@
+/*
+ * @Author: zwq
+ * @Date: 2022-08-24 11:19:43
+ * @LastEditors: zwq
+ * @LastEditTime: 2022-08-24 14:06:58
+ * @Description:
+ */
+export default {
+ data () {
+ /* eslint-disable */
+ return {
+ urlOptions: {
+ getDataListURL: '',
+ deleteURL: '',
+ statusUrl: '',
+ exportUrl: ''
+ },
+ dataForm: {
+ paramKey: "",
+ },
+ dataList: [],
+ pageIndex: 1,
+ pageSize: 10,
+ totalPage: 0,
+ dataListLoading: false,
+ addOrUpdateVisible: false,
+ }
+ },
+ created () {
+ },
+ activated() {
+ this.getDataList();
+ },
+ methods: {
+
+ // 获取数据列表
+ getDataList() {
+ this.dataListLoading = true;
+ this.$http
+ .get(this.urlOptions.getDataListURL, {
+ params: {
+ page: this.pageIndex,
+ limit: this.pageSize,
+ code: this.dataForm.paramKey,
+ name: this.dataForm.paramKey,
+ },
+ })
+ .then(({ data: res }) => {
+ this.dataListLoading = false;
+ if (res.code !== 0) {
+ this.dataList = [];
+ this.totalPage = 0;
+ return this.$message.error(res.msg);
+ }
+ this.dataList = res.data.list;
+ this.totalPage = res.data.total;
+ })
+ .catch(() => {
+ this.dataListLoading = false;
+ });
+ },
+ // 每页数
+ sizeChangeHandle(val) {
+ this.pageSize = val;
+ this.pageIndex = 1;
+ this.getDataList();
+ },
+ // 当前页
+ currentChangeHandle(val) {
+ this.pageIndex = val;
+ this.getDataList();
+ },
+ // 新增 / 修改
+ addOrUpdateHandle(id) {
+ this.addOrUpdateVisible = true;
+ this.$nextTick(() => {
+ this.$refs.addOrUpdate.init(id);
+ });
+ },
+ cancel(id) {
+ this.$refs["popover-" + id].showPopper = false;
+ },
+ changeStatus(id) {
+ this.$http
+ .post(this.urlOptions.statusUrl, { id })
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.$refs["popover-" + id].showPopper = false;
+ this.$message({
+ message: this.$t("prompt.success"),
+ type: "success",
+ duration: 500,
+ onClose: () => {
+ this.getDataList();
+ },
+ });
+ })
+ .catch(() => {});
+ },
+ // 删除
+ deleteHandle(id, name) {
+ this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: "操作成功",
+ type: "success",
+ duration: 1500,
+ onClose: () => {
+ this.getDataList();
+ },
+ });
+ } else {
+ this.$message.error(data.msg);
+ }
+ });
+ })
+ .catch(() => {});
+ },
+ // 导出
+ exportHandle(name) {
+ this.$http
+ .get(this.urlOptions.exportUrl, { responseType: "blob" })
+ .then(({ data: res }) => {
+ var date = new Date();
+ var year = date.getFullYear();
+ var month = date.getMonth() + 1;
+ var strDate = date.getDate();
+ if (month >= 1 && month <= 9) {
+ month = "0" + month;
+ }
+ if (strDate >= 0 && strDate <= 9) {
+ strDate = "0" + strDate;
+ }
+ var currentdate = year + "-" + month + "-" + strDate;
+ const blob = new Blob([res]);
+ const downloadElement = document.createElement("a");
+ const href = window.URL.createObjectURL(blob); // 创建下载的链接
+ downloadElement.href = href;
+ downloadElement.download = `${name+currentdate}.xls`; // 下载后文件名
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); // 点击下载
+ document.body.removeChild(downloadElement); // 下载完成移除元素
+ window.URL.revokeObjectURL(href);
+ })
+ .catch(() => {});
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index abd1405..1fa8d9d 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -43,8 +43,8 @@ export const moduleRoutes = {
{ path: '/processFlow', component: () => import('@/views/spc-basic/processFlow'), name: 'processFlow', meta: { title: '工艺流程', isTab: true } },
{ path: '/siteManage', component: () => import('@/views/spc-basic/siteManage'), name: 'siteManage', meta: { title: '站点管理', isTab: true } },
{ path: '/machineManage', component: () => import('@/views/spc-basic/machineManage'), name: 'machineManage', meta: { title: '机台管理', isTab: true } },
- { path: '/toolsType', component: () => import('@/views/spc-basic/toolsType'), name: 'toolsType', meta: { title: '量具类型', isTab: true } },
- { path: '/unitList', component: () => import('@/views/spc-basic/unitList'), name: 'unitList', meta: { title: '计量单位列表', isTab: true } }
+ { path: '/toolsType', component: () => import('@/views/spc-basic/toolsType'), name: 'toolsType', meta: { title: '量具管理', isTab: true } },
+ { path: '/unitList', component: () => import('@/views/spc-basic/unitList'), name: 'unitList', meta: { title: '计量单位管理', isTab: true } }
]
}
diff --git a/src/views/main-sidebar.vue b/src/views/main-sidebar.vue
index c4894f0..2510ac6 100644
--- a/src/views/main-sidebar.vue
+++ b/src/views/main-sidebar.vue
@@ -65,11 +65,11 @@
- 量具类型
+ 量具管理
- 计量单位列表
+ 计量单位管理
diff --git a/src/views/pages/login.vue b/src/views/pages/login.vue
index 3f03233..885a2bc 100644
--- a/src/views/pages/login.vue
+++ b/src/views/pages/login.vue
@@ -58,7 +58,7 @@ export default {
return {
captchaPath: '',
dataForm: {
- username: 'admin',
+ username: 'admin1',
password: 'admin',
uuid: '',
captcha: ''
diff --git a/src/views/spc-basic/components/factoryManage-add.vue b/src/views/spc-basic/components/factoryManage-add.vue
index 8442c52..a386168 100644
--- a/src/views/spc-basic/components/factoryManage-add.vue
+++ b/src/views/spc-basic/components/factoryManage-add.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2022-08-12 15:37:44
+ * @LastEditTime: 2022-08-24 14:10:21
* @Description:
-->
@@ -24,22 +24,22 @@
-
-
+
+
-
+
- 内部工厂
- 供应商
+ 内部工厂
+ 供应商
-
+
diff --git a/src/views/spc-basic/components/machineManage-add.vue b/src/views/spc-basic/components/machineManage-add.vue
index bda65e3..2a76c87 100644
--- a/src/views/spc-basic/components/machineManage-add.vue
+++ b/src/views/spc-basic/components/machineManage-add.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2022-08-12 15:45:19
+ * @LastEditTime: 2022-08-24 14:52:18
* @Description:
-->
@@ -17,14 +17,14 @@
-
+
-
-
+
+
diff --git a/src/views/spc-basic/components/processDefine-add.vue b/src/views/spc-basic/components/processDefine-add.vue
index b05e6d7..61c6031 100644
--- a/src/views/spc-basic/components/processDefine-add.vue
+++ b/src/views/spc-basic/components/processDefine-add.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2022-08-19 14:42:35
+ * @LastEditTime: 2022-08-24 15:31:22
* @Description:
-->
@@ -16,14 +16,14 @@
-
+
diff --git a/src/views/spc-basic/components/processDefine-machine.vue b/src/views/spc-basic/components/processDefine-machine.vue
index 9e16be2..935ca60 100644
--- a/src/views/spc-basic/components/processDefine-machine.vue
+++ b/src/views/spc-basic/components/processDefine-machine.vue
@@ -2,14 +2,19 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2022-08-19 14:47:07
+ * @LastEditTime: 2022-08-24 16:10:47
* @Description:
-->
-
-
+
+
diff --git a/src/views/spc-basic/components/processFlow-graph.vue b/src/views/spc-basic/components/processFlow-graph.vue
new file mode 100644
index 0000000..e69de29
diff --git a/src/views/spc-basic/components/processType-add.vue b/src/views/spc-basic/components/processType-add.vue
index 9fd6b94..7a45f58 100644
--- a/src/views/spc-basic/components/processType-add.vue
+++ b/src/views/spc-basic/components/processType-add.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2022-08-12 15:40:35
+ * @LastEditTime: 2022-08-24 14:10:06
* @Description:
-->
@@ -26,10 +26,15 @@
diff --git a/src/views/spc-basic/components/productList-add.vue b/src/views/spc-basic/components/productList-add.vue
index b2321ad..02a9d52 100644
--- a/src/views/spc-basic/components/productList-add.vue
+++ b/src/views/spc-basic/components/productList-add.vue
@@ -2,15 +2,16 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
- * @LastEditTime: 2022-08-18 15:13:22
+ * @LastEditTime: 2022-08-31 10:22:30
* @Description:
-->
@@ -25,27 +26,34 @@