产品列表数据展示
parent
2fcae8c82f
commit
565eefe8e5
|
@ -2,3 +2,7 @@ import axios from 'axios'
|
|||
import qs from 'qs'
|
||||
|
||||
export const customerData = query => axios.post('http://oa-dxtc.test/customer', qs.stringify(query));
|
||||
|
||||
export const customerAdd = addQuery => axios.post('http://oa-dxtc.test/customer/add', qs.stringify(addQuery));
|
||||
|
||||
export const customerEdit = editQuery => axios.post('http://oa-dxtc.test/customer/edit', qs.stringify(editQuery));
|
|
@ -1,4 +0,0 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export const customerAdd = query => axios.post('http://oa-dxtc.test/customer/add', qs.stringify(query));
|
|
@ -1,4 +0,0 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export const customerEdit = query => axios.post('http://oa-dxtc.test/customer/edit', qs.stringify(query));
|
|
@ -0,0 +1,6 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export const projectData = query => axios.post('http://oa-dxtc.test/project/index', qs.stringify(query));
|
||||
|
||||
export const projectAdd = addQuery => axios.post('http://oa-dxtc.test/project/add', qs.stringify(addQuery));
|
|
@ -1,4 +0,0 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export const projectAdd = query => axios.post('http://oa-dxtc.test/project/add', qs.stringify(query));
|
|
@ -2,3 +2,7 @@ import axios from 'axios'
|
|||
import qs from 'qs'
|
||||
|
||||
export const sourceData = query => axios.post('http://oa-dxtc.test/source/index', qs.stringify(query));
|
||||
|
||||
export const sourceAdd = addQuery => axios.post('http://oa-dxtc.test/source/add', qs.stringify(addQuery));
|
||||
|
||||
export const sourceEdit = editQuery => axios.post('http://oa-dxtc.test/source/edit', qs.stringify(editQuery));
|
|
@ -1,4 +0,0 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export const sourceAdd = query => axios.post('http://oa-dxtc.test/source/add', qs.stringify(query));
|
|
@ -1,4 +0,0 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export const sourceEdit = query => axios.post('http://oa-dxtc.test/source/edit', qs.stringify(query));
|
|
@ -0,0 +1,4 @@
|
|||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export const userData = query => axios.post('http://oa-dxtc.test/user/index', qs.stringify(query));
|
|
@ -121,9 +121,9 @@
|
|||
<script>
|
||||
import { ref, reactive } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { customerData } from "../api/customer";
|
||||
import { customerAdd } from "../api/customerAdd";
|
||||
import { customerEdit } from '../api/customerEdit';
|
||||
import { customerData, customerAdd, customerEdit } from "../api/customer";
|
||||
// import { customerAdd } from "../api/customerAdd";
|
||||
// import { customerEdit } from '../api/customerEdit';
|
||||
import { sourceData } from '../api/source';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
v-for="item in customerListData"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
:label="item.company"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -125,7 +125,9 @@
|
|||
<script lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { ElMessage } from "element-plus";
|
||||
import { projectAdd } from "../api/projectAdd";
|
||||
import { projectData, projectAdd } from "../api/project";
|
||||
import { customerData } from '../api/customer';
|
||||
import { userData } from '../api/user';
|
||||
|
||||
export default{
|
||||
setup() {
|
||||
|
@ -144,6 +146,31 @@ export default{
|
|||
]
|
||||
});
|
||||
|
||||
// 获取初始数据
|
||||
const query = reactive({
|
||||
page: 1
|
||||
});
|
||||
const pageTotal = ref(0);
|
||||
const getData = () => {
|
||||
//项目列表数据
|
||||
projectData(query).then((res) => {
|
||||
tableData.value = res.data.data;
|
||||
pageTotal.value = res.data.pageTotal || 0;
|
||||
});
|
||||
|
||||
//客户列表谁
|
||||
customerData({}).then((res) => {
|
||||
console.log(res.data.data)
|
||||
customerListData.value = res.data.data;
|
||||
});
|
||||
//负责人列表数据
|
||||
userData({}).then((res) => {
|
||||
console.log(res.data.data)
|
||||
userListData.value = res.data.data;
|
||||
});
|
||||
};
|
||||
getData();
|
||||
|
||||
//新增
|
||||
const addVisible = ref(false);
|
||||
const tableAddData = ref(null);
|
||||
|
|
|
@ -62,9 +62,9 @@
|
|||
<script lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { ElMessage } from "element-plus";
|
||||
import { sourceAdd } from "../api/sourceAdd";
|
||||
import { sourceEdit } from '../api/sourceEdit';
|
||||
import { sourceData } from '../api/source';
|
||||
// import { sourceAdd } from "../api/sourceAdd";
|
||||
// import { sourceEdit } from '../api/sourceEdit';
|
||||
import { sourceData, sourceAdd, sourceEdit } from '../api/source';
|
||||
|
||||
export default {
|
||||
//name: 'source2',
|
||||
|
|
Loading…
Reference in New Issue