| | |
| | | // export default { |
| | | // serverUrl: "localhost:8083/api/loadGlass", |
| | | // serverUrl2: "localhost:8085" |
| | | // //serverUrl:"res.abeim.cn" |
| | | // } |
| | | export default { |
| | | serverUrl: "localhost:8085", |
| | | serverUrl: "localhost:88/api", |
| | | serverUrl2: "localhost:8085" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | |
| | | //提取模块列表 |
| | | let menuList = $ref([]) |
| | | request.get('/menu/sysMenu/list').then((res) => { |
| | | request.get('/loadGlass/menu/sysMenu/list').then((res) => { |
| | | if (res.code == 200) { |
| | | menuList = deepClone(res.data) |
| | | } else { |
| | |
| | | const userStore=useUserInfoStore() |
| | | const request = axios.create({ |
| | | baseURL: `http://${config.serverUrl}`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! |
| | | timeout: 5000 |
| | | timeout: 30000 |
| | | }) |
| | | |
| | | // |
| | |
| | | if (valid) { |
| | | loginLoadings.value = true |
| | | request |
| | | .post('/userinfo/login', userForm) |
| | | .post('/loadGlass/userinfo/login', userForm) |
| | | .then((res) => { |
| | | if (res['code'] == 200) { |
| | | store.$patch({user: res.data}) |
| | |
| | | |
| | | import { ref, onMounted } from "vue"; |
| | | // import http from "@/http/index"; |
| | | const tableData = ref([]) |
| | | let app = ref({ |
| | | data(){ |
| | | return { |
| | | enableState:'', |
| | | } |
| | | }, |
| | | }) |
| | | // const tableData = ref([]) |
| | | // let app = ref({ |
| | | // data(){ |
| | | // return { |
| | | // enableState:'', |
| | | // } |
| | | // }, |
| | | // }) |
| | | // const tableData = ref({ |
| | | // workstationId:'', |
| | | // patternWidth :'', |
| | |
| | | // router.push("/login") |
| | | // } |
| | | // }); |
| | | onMounted(() => { |
| | | request |
| | | .get("/LoadGlass/list") |
| | | |
| | | // request |
| | | // const requestData = { |
| | | // projectNo:"P24030805", |
| | | // state:0 |
| | | // }; |
| | | |
| | | |
| | | const requestData = { |
| | | // projectNo:"P24030805", |
| | | state:100 |
| | | }; |
| | | |
| | | const tableData = reactive([]); |
| | | |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | const response = await request.get("/loadGlass/LoadGlass/list"); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | | console.log('成功获取表格数据:', response.data); |
| | | tableData.splice(0, tableData.length, ...response.data); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | | } |
| | | } catch (error) { |
| | | // 处理请求失败的情况 |
| | | ElMessage.error('获取表格数据失败,请重试'); |
| | | } |
| | | }; |
| | | const user = ref(''); |
| | | const remoteMethod = () => { |
| | | request.post("/loadGlass/optimizeProject/listByState", requestData) |
| | | .then((res: any) => { |
| | | if (res.code == 200) { |
| | | // if (res.code == 200) { |
| | | tableData.value = res.data; |
| | | // let self = this |
| | | // } |
| | | }) |
| | | .catch((err: any) => {}); |
| | | } |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | onMounted(() => { |
| | | request |
| | | .post("/LoadGlass/selectPriority") |
| | | .then((res: any) => { |
| | | tableData.value = res.data; |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | |
| | | |
| | | onMounted(fetchTableData); |
| | | |
| | | |
| | | // onMounted(() => { |
| | | // request |
| | | // .post("/loadGlass/LoadGlass/selectPriority") |
| | | // .then((res: any) => { |
| | | // tableData.value = res.data; |
| | | // }) |
| | | // .catch((err: any) => {}); |
| | | // }); |
| | | interface User { |
| | | id: string |
| | | name: string |
| | |
| | | } |
| | | } |
| | | } |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option4', |
| | | label: 'P202561456', |
| | | }, |
| | | { |
| | | value: 'Option5', |
| | | label: 'P202561456', |
| | | }, |
| | | ] |
| | | // const tableData: User[] = [ |
| | | |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '1005', |
| | | // wide: '183.6', |
| | | // thick: '1991', |
| | | // }, |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '105', |
| | | // wide: '183', |
| | | // thick: '191', |
| | | // } |
| | | // ] |
| | | // const tableDataa = [ |
| | | // { |
| | | // long: '1005', |
| | | // wide: '183.6', |
| | | // thick: '1991', |
| | | // station: '1' |
| | | // }, |
| | | // { |
| | | // long: '105', |
| | | // wide: '183', |
| | | // thick: '191', |
| | | // station: '1' |
| | | // } |
| | | // ] |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | |
| | | min-width="80" |
| | | prop="enableState" |
| | | > |
| | | <el-tag type="success" v-if=" tableData.enableState == '1'">就绪</el-tag> |
| | | <!-- <el-tag type="danger" v-if="this.enableState === '2'">未就绪</el-tag> --> |
| | | <el-tag type="success">就绪</el-tag> |
| | | <!-- <el-tag type="danger" v-if="row.enableState==2">未就绪</el-tag> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 300px" |
| | | filterable |
| | | :remote-method="remoteMethod" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in remoteMethod" |
| | | :key="item.projectNo" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select clearable filterable size="mini" v-model="form.fvId" |
| | | style="margin-right: 50px;width: 200px" placeholder="请选择果蔬种类"> |
| | | <el-option v-for="item in billall" |
| | | :key="item.id" |
| | | :label="item.fruitVagetableCate" |
| | | :value="item.id"></el-option> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |