Commit 5494133a authored by 张伯涛's avatar 张伯涛

获取服务器时间

parent 529773f3
...@@ -647,7 +647,7 @@ ...@@ -647,7 +647,7 @@
</template> </template>
<script> <script>
import { proGetCompany, projectAdd, projectEdit, getDictAll, projectBYID, projectQuery } from '@/views/projectInfo/api' import { proGetCompany, projectAdd, projectEdit, getDictAll, projectBYID, projectQuery, ServerTime } from '@/views/projectInfo/api'
import { Store } from '@/utils/storage' import { Store } from '@/utils/storage'
import { storeKey } from '@/utils/auth' import { storeKey } from '@/utils/auth'
import { getUnit } from '@/views/contactsUnit/api' import { getUnit } from '@/views/contactsUnit/api'
...@@ -692,7 +692,7 @@ export default { ...@@ -692,7 +692,7 @@ export default {
}, },
pickerZapStartOptions: { pickerZapStartOptions: {
disabledDate: (date) => { disabledDate: (date) => {
return (new Date(date).getTime() >= new Date(new Date()).getTime()) return (new Date(date).getTime() >= new Date(this.NewTime).getTime())
} }
}, },
pickerZisStartOptions: { pickerZisStartOptions: {
...@@ -743,6 +743,7 @@ export default { ...@@ -743,6 +743,7 @@ export default {
} }
} }
}, },
NewTime: '',
zprojTypeDialogVisible: false, zprojTypeDialogVisible: false,
busTypeDialogVisible: false, busTypeDialogVisible: false,
ZPOSDialogVisible: false, ZPOSDialogVisible: false,
...@@ -1110,6 +1111,9 @@ export default { ...@@ -1110,6 +1111,9 @@ export default {
} }
} }
}, },
created() {
this.getNewDate()
},
mounted() { mounted() {
this.type = this.$route.query.type this.type = this.$route.query.type
// 根据表单选取的不同限制必填项显示 // 根据表单选取的不同限制必填项显示
...@@ -1386,6 +1390,12 @@ export default { ...@@ -1386,6 +1390,12 @@ export default {
} }
}, },
methods: { methods: {
/** 获取服务器时间*/
getNewDate() {
ServerTime().then(res => {
this.NewTime = res.data
})
},
messageInfo2(rule, value, callback) { messageInfo2(rule, value, callback) {
if (!value) { if (!value) {
if (this.number === '07') { if (this.number === '07') {
......
...@@ -8,6 +8,14 @@ export function projectAdd(data) { ...@@ -8,6 +8,14 @@ export function projectAdd(data) {
data data
}) })
} }
/** 获取服务器时间 */
export function ServerTime(data) {
return request({
url: '/contract/contract/getTime',
method: 'get',
params: data
})
}
/** 所属二级单位查询*/ /** 所属二级单位查询*/
export function proGetCompany(data) { export function proGetCompany(data) {
return request({ return request({
......
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