| | |
| | | const apiConfig = { |
| | | // 开发环境 |
| | | development: { |
| | | baseURL: "", |
| | | baseURL: "http://192.168.110.34:8081/", |
| | | imgUrl: "", |
| | | }, |
| | | // 生产环境 |
| | |
| | | const res = response; |
| | | if (res.data.code == 200) { |
| | | if (!res.data.data) { |
| | | return Promise.resolve({}) |
| | | return Promise.resolve({...res.data}) |
| | | } |
| | | return Promise.resolve(res.data.data) |
| | | } else { |
| | |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-button type="default" @click="resetForm">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | | <el-button type="primary" @click="handleSearch" style="margin-left: 20px;">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | |
| | | <script> |
| | | import ApprovalDialog from './components/approvalDialog.vue' |
| | | import { getProposalList } from './service' |
| | | |
| | | export default { |
| | | name: "ProjectList", |
| | |
| | | createTime: [], |
| | | approver: "", |
| | | status: "", |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }, |
| | | tableData: [], |
| | | total: 0, |
| | |
| | | createTime: [], |
| | | approver: "", |
| | | status: "", |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }; |
| | | }, |
| | | handleSearch() { |
| | |
| | | getTableData() { |
| | | // 根据currentType请求不同的数据 |
| | | if (this.currentType === 'list') { |
| | | getProposalList(this.form).then(res => { |
| | | console.log(res,'1111111111111111111111111') |
| | | }) |
| | | this.tableData = this.mockListData; |
| | | this.total = this.mockListData.length; |
| | | } else { |
New file |
| | |
| | | import axios from '@/utils/request'; |
| | | |
| | | // 添加项目课题方案 |
| | | export function addProposal(data) { |
| | | return axios.post('/api/t-project-proposal/add', { ...data }) |
| | | } |
| | | //修改方案 |
| | | export function updateProposal(data) { |
| | | return axios.post('/api/t-project-proposal/update', { ...data }) |
| | | } |
| | | //查询方案列表 |
| | | export function getProposalList(data) { |
| | | return axios.post('/api/t-project-proposal/pageList', { ...data }) |
| | | } |
| | | //上下架 |
| | | export function upAndDown(data) { |
| | | return axios.post('/api/t-project-proposal/upAndDown', { ...data }) |
| | | } |
| | | //审批 |
| | | export function audit(data) { |
| | | return axios.post('/api/t-project-proposal/audit', { ...data }) |
| | | } |
| | | |
| | | //删除 |
| | | export function deleteById(data) { |
| | | return axios.delete('/open/t-project-proposal/deleteById', { ...data }) |
| | | } |
| | | |
| | | //批量删除 |
| | | export function deleteByIds(data) { |
| | | return axios.delete('/open/t-project-proposal/deleteByIds', { ...data }) |
| | | } |
| | | //根据id查询方案详情 |
| | | export function getDetailById(data) { |
| | | return axios.get('/open/t-project-proposal/getDetailById', { ...data }) |
| | | } |
| | |
| | | <div class="login-form"> |
| | | <div class="form-item flex"> |
| | | <img class="form-item-icon" :src="require('../../assets/login/account@2x.png')" alt=""> |
| | | <el-input v-model="loginForm.account" placeholder="请输入账号"></el-input> |
| | | <el-input v-model="loginForm.username" placeholder="请输入账号"></el-input> |
| | | </div> |
| | | |
| | | <div class="form-item flex mt-40"> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { login } from './service' |
| | | export default { |
| | | name: 'Login', |
| | | data() { |
| | |
| | | windowWidth: window.innerWidth, |
| | | |
| | | loginForm: { |
| | | account: '', |
| | | username: '', |
| | | password: '' |
| | | }, |
| | | viewWidth: '', |
| | |
| | | console.log(this.viewWidth) |
| | | }, |
| | | login() { |
| | | this.$router.push('/') |
| | | console.log(this.loginForm) |
| | | login(this.loginForm).then(res => { |
| | | console.log(res,'1111111111111111111111111') |
| | | if (res.code === 200) { |
| | | sessionStorage.setItem('token', res.token) |
| | | sessionStorage.setItem('userInfo', JSON.stringify(res.userInfo)) |
| | | this.$router.push('/') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |