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

获取服务器时间

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