diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 1115695..5387d4c 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -9,6 +9,7 @@ export default {
userDev: false,
multiLanguage: '',
authControl: '',
+ userSite: 0,
},
mutations: {
updateId (state, id) {
@@ -23,6 +24,9 @@ export default {
updateSite (state,site){
state.site = site
},
+ updateUserSite (state,userSite){
+ state.userSite = userSite
+ },
updateUserDisplay (state,userDisplay){
state.userDisplay = userDisplay
},
diff --git a/src/views/common/login.vue b/src/views/common/login.vue
index 0684782..4bf55e5 100644
--- a/src/views/common/login.vue
+++ b/src/views/common/login.vue
@@ -6,6 +6,18 @@
用户登陆
+
+
+
+
+
+
@@ -25,6 +37,9 @@
diff --git a/src/views/main.vue b/src/views/main.vue
index 4836262..99750fb 100644
--- a/src/views/main.vue
+++ b/src/views/main.vue
@@ -80,6 +80,14 @@
this.$store.commit('user/updateSite', val)
}
},
+ userSite: {
+ get() {
+ return this.$store.state.user.userSite
+ },
+ set(val) {
+ this.$store.commit('user/updateUserSite', val)
+ }
+ },
languageDefault: {
get() {
return this.$store.state.user.languageDefault
@@ -122,9 +130,9 @@
this.loading = false
this.userId = data.user.userId
this.userName = data.user.username
- this.site = data.user.site
+ this.userSite = data.user.site
this.languageDefault = data.user.languageDefault
- this.site = data.user.site
+ this.site =localStorage.getItem("accessSite")
this.userDisplay = data.user.userDisplay
}
})
diff --git a/src/views/modules/project/demo.vue b/src/views/modules/project/demo.vue
index 0445ac2..de5ae75 100644
--- a/src/views/modules/project/demo.vue
+++ b/src/views/modules/project/demo.vue
@@ -1,7 +1,13 @@
- 查询
+
+ 工厂编码
+
+
+
+ 查询
+
修改
@@ -38,6 +45,17 @@
+
+
+
+
@@ -47,15 +65,30 @@
getTableDefaultListLanguage,
getTableUserListLanguage,
} from "@/api/table.js"
- import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
-
+ import Chooselist from '@/views/modules/common/Chooselist'
+ import { } from "@/api/table.js"
export default {
name: "null",
data() {
return {
+ searchData:{
+ page: 1,
+ limit: 10,
+ },
height: 200,
dataList:[],
dataListLoading: false,
+ // 导出 start
+ exportData: [],
+ exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
+ exportHeader: ["项目清单"],
+ exportFooter: [],
+ exportList:[],
+ tagNo:'',
+ tagNo2:'',
+ pageIndex: 1,
+ pageSize: 100,
+ totalPage: 0,
columnList1: [
{
userId: this.$store.state.user.name,
@@ -111,6 +144,95 @@
})
},
methods: {
+ // 获取基础数据列表S
+ getBaseList (val, type) {
+ this.tagNo = val
+ this.tagNo2 = type
+ this.$nextTick(() => {
+ let strVal = ''
+ if (val === 26) {
+ if(type==1) {
+ strVal = this.saveHeaderData.operatorId
+ }else if(type==2){
+ strVal = this.saveHeaderData.operatorId2
+ }else {
+ strVal = this.searchData.operatorName
+ }
+ }
+ this.$refs.baseList.init(val, strVal)
+ })
+ },
+ /* 列表方法的回调 */
+ getBaseData (val) {
+ if (this.tagNo === 26) {
+ if(this.tagNo2==1) {
+ this.saveHeaderData.operatorId = val.OperatorID
+ this.saveHeaderData.operatorName = val.OperatorName
+ }else if(this.tagNo2==2){
+ this.saveHeaderData.operatorId2 = val.OperatorID
+ this.saveHeaderData.operatorIdName2 = val.OperatorName
+ }else {
+ this.searchData.operatorName = val.OperatorName
+ }
+ }
+ },
+ //导出excel
+ async createExportData() {
+ this.searchData.limit = -1
+ this.searchData.page = 1
+ await eamWorkPlanSearch(this.searchData).then(({data}) => {
+ this.exportList= data.page.list;
+ })
+
+ return this.exportList;
+ },
+ startDownload() {
+ // this.exportData = this.dataList
+
+ },
+ finishDownload() {
+
+ },
+ fields() {
+ let json = "{"
+ this.columnList.forEach((item, index) => {
+ if (index == this.columnList.length - 1) {
+ json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
+ } else {
+ json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
+ }
+ })
+ json += "}"
+ let s = eval("(" + json + ")")
+
+ return s
+ },
+ // 导出 end
+ // 获取数据列表
+ search () {
+ this.searchData.limit = this.pageSize
+ this.searchData.page = this.pageIndex
+ eamWorkPlanSearch(this.searchData).then(({data}) => {
+ if (data.code == 0) {
+ this.dataList = data.page.list
+ this.pageIndex = data.page.currPage
+ this.pageSize = data.page.pageSize
+ this.totalPage = data.page.totalCount
+ }
+ this.dataListLoading = false
+ })
+ },
+ // 每页数
+ sizeChangeHandle (val) {
+ this.pageSize = val
+ this.pageIndex = 1
+ this.getDataList()
+ },
+ // 当前页
+ currentChangeHandle (val) {
+ this.pageIndex = val
+ this.getDataList()
+ },
// 动态列开始 获取 用户保存的 格式列
async getTableUserColumn(tableId, columnId) {
let queryTableUser = {
diff --git a/src/views/modules/project/projectInfo/projectInfo.vue b/src/views/modules/project/projectInfo/projectInfo.vue
index 70c497f..40c045c 100644
--- a/src/views/modules/project/projectInfo/projectInfo.vue
+++ b/src/views/modules/project/projectInfo/projectInfo.vue
@@ -1,7 +1,13 @@
- 查询
+
+ 工厂编码
+
+
+
+ 查询
+
修改
@@ -38,6 +45,17 @@
+
+
+
+
@@ -47,17 +65,34 @@
getTableDefaultListLanguage,
getTableUserListLanguage,
} from "@/api/table.js"
- import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
-
+ import Chooselist from '@/views/modules/common/Chooselist'
+ import { } from "@/api/table.js"
export default {
+ components: {
+ Chooselist
+ },
name: "null",
data() {
return {
-
+ searchData:{
+ page: 1,
+ limit: 10,
+ },
height: 200,
dataList:[],
dataListLoading: false,
-
+ // 导出 start
+ exportData: [],
+ exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
+ exportHeader: ["项目清单"],
+ exportFooter: [],
+ exportList:[],
+ tagNo:'',
+ tagNo2:'',
+ pageIndex: 1,
+ pageSize: 100,
+ totalPage: 0,
+ // 导出 end
columnList1: [
{
userId: this.$store.state.user.name,
@@ -330,6 +365,95 @@
})
},
methods: {
+ // 获取基础数据列表S
+ getBaseList (val, type) {
+ this.tagNo = val
+ this.tagNo2 = type
+ this.$nextTick(() => {
+ let strVal = ''
+ if (val === 26) {
+ if(type==1) {
+ strVal = this.saveHeaderData.operatorId
+ }else if(type==2){
+ strVal = this.saveHeaderData.operatorId2
+ }else {
+ strVal = this.searchData.operatorName
+ }
+ }
+ this.$refs.baseList.init(val, strVal)
+ })
+ },
+ /* 列表方法的回调 */
+ getBaseData (val) {
+ if (this.tagNo === 26) {
+ if(this.tagNo2==1) {
+ this.saveHeaderData.operatorId = val.OperatorID
+ this.saveHeaderData.operatorName = val.OperatorName
+ }else if(this.tagNo2==2){
+ this.saveHeaderData.operatorId2 = val.OperatorID
+ this.saveHeaderData.operatorIdName2 = val.OperatorName
+ }else {
+ this.searchData.operatorName = val.OperatorName
+ }
+ }
+ },
+ //导出excel
+ async createExportData() {
+ this.searchData.limit = -1
+ this.searchData.page = 1
+ await eamWorkPlanSearch(this.searchData).then(({data}) => {
+ this.exportList= data.page.list;
+ })
+
+ return this.exportList;
+ },
+ startDownload() {
+ // this.exportData = this.dataList
+
+ },
+ finishDownload() {
+
+ },
+ fields() {
+ let json = "{"
+ this.columnList.forEach((item, index) => {
+ if (index == this.columnList.length - 1) {
+ json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
+ } else {
+ json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
+ }
+ })
+ json += "}"
+ let s = eval("(" + json + ")")
+
+ return s
+ },
+ // 导出 end
+ // 获取数据列表
+ search () {
+ this.searchData.limit = this.pageSize
+ this.searchData.page = this.pageIndex
+ eamWorkPlanSearch(this.searchData).then(({data}) => {
+ if (data.code == 0) {
+ this.dataList = data.page.list
+ this.pageIndex = data.page.currPage
+ this.pageSize = data.page.pageSize
+ this.totalPage = data.page.totalCount
+ }
+ this.dataListLoading = false
+ })
+ },
+ // 每页数
+ sizeChangeHandle (val) {
+ this.pageSize = val
+ this.pageIndex = 1
+ this.getDataList()
+ },
+ // 当前页
+ currentChangeHandle (val) {
+ this.pageIndex = val
+ this.getDataList()
+ },
// 动态列开始 获取 用户保存的 格式列
async getTableUserColumn(tableId, columnId) {
let queryTableUser = {
@@ -389,7 +513,7 @@
// break;
}
} else {
- // this.showDefault = true
+ // this.showDefault = true.
}
})