Browse Source

任务管理

master
maochaoying 2 years ago
parent
commit
a84a0001f8
  1. 7
      src/api/task.js
  2. 16
      src/components/Task.vue
  3. 67
      src/pages/index.vue
  4. 3
      vite.config.js

7
src/api/task.js

@ -7,3 +7,10 @@ export const createTaskApi = data => {
data,
})
}
export const taskListApi = () => {
return request({
url: '/task/list',
method: 'GET',
})
}

16
src/components/Task.vue

@ -24,13 +24,14 @@
</template>
<script lang="jsx">
import { taskListApi } from '@/api/task'
export default {
data() {
return {
data: [],
columns: [
{
colKey: 'username',
colKey: 'operatorName',
title: '操作员',
},
{
@ -38,12 +39,12 @@ export default {
title: '发布时间',
},
{
colKey: 'stationName',
colKey: 'nuclearStationName',
title: '核电站名称',
ellipsis: true,
},
{
colKey: 'coreName',
colKey: 'nuclearCoreName',
title: '核反应堆',
},
{
@ -81,6 +82,15 @@ export default {
delTask(taskId) {},
delExcel(taskId) {},
uploadExcel(taskId) {},
async getTaskList() {
const res = await taskListApi()
if (res?.code == 200) {
this.data = res?.data
}
},
},
mounted() {
this.getTaskList()
},
}
</script>

67
src/pages/index.vue

@ -193,7 +193,30 @@
<Image />
<Excel :excelData="excelData" />
</div>
<div class="bottom_operation_container"></div>
<div class="bottom_operation_container ignore-height">
<div class="auto_btn">
<p class="title">[开启]自动核查</p>
<div class="icon_box">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="38.99494552612305"
height="52"
viewBox="0 0 38.99494552612305 52"
>
<g>
<path
d="M3.57351,0C1.43895,0,0,1.35711,0,3.37574L0,48.3583C0,50.4656,1.7663,52,4.19411,52C5.35345,52,6.43096,51.6386,7.18795,50.9975L37.5083,29.9043L37.5901,29.8292C38.4971,28.9972,38.9949,27.8925,38.9949,26.7127C38.9949,25.5329,38.4971,24.4281,37.5901,23.5961L37.4469,23.4801L7.21523,1.32302C6.28775,0.518295,4.87608,0.0000010406,3.57351,0Z"
fill="#FFFFFF"
fill-opacity="1"
/>
</g>
</svg>
</div>
</div>
</div>
</div>
<div class="task_container" v-if="accountStore.activePage == 1">
<Task />
@ -337,7 +360,8 @@ onMounted(async () => {
box-sizing: border-box;
flex-direction: column;
.two_content_container {
flex: 1;
// flex: 1;
height: calc(100vh - 250px);
width: 100%;
display: grid;
grid-template-columns: repeat(2, 1fr);
@ -345,10 +369,47 @@ onMounted(async () => {
column-gap: 30px;
box-sizing: border-box;
}
.bottom_operation_container {
min-height: 130px;
width: 100%;
height: 120px;
margin-top: 30px;
box-sizing: border-box;
display: flex;
align-items: center;
.auto_btn {
display: flex;
align-items: center;
box-sizing: border-box;
cursor: pointer;
padding: 12px 28px;
border-radius: 6px;
background: #3662ec;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
.title {
font-size: 28px;
font-weight: bold;
letter-spacing: 0.07em;
color: #ffffff;
margin-right: 26px;
white-space: nowrap;
}
.icon_box {
display: flex;
align-items: center;
justify-content: center;
background: #6573fb;
width: 100px;
height: 100px;
border-radius: 6px;
}
}
}
@media screen and (max-height: 1000px) {
.bottom_operation_container {
margin-top: 10px;
}
}
}
.task_container {

3
vite.config.js

@ -41,11 +41,12 @@ export default defineConfig({
postcsspxtoviewport({
unitToConvert: 'px', // 要转化的单位
viewportWidth: 1920, // UI设计稿的宽度
viewportHeight: 1080,
unitPrecision: 6, // 转换后的精度,即小数点位数
propList: ['*'], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换
viewportUnit: 'vw', // 指定需要转换成的视窗单位,默认vw
fontViewportUnit: 'vw', // 指定字体需要转换成的视窗单位,默认vw
selectorBlackList: ['t-'], // 指定不转换为视窗单位的类名,
selectorBlackList: ['t-', 'ignore-'], // 指定不转换为视窗单位的类名,
minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换
mediaQuery: true, // 是否在媒体查询的css代码中也进行转换,默认false
replace: true, // 是否转换后直接更换属性值

Loading…
Cancel
Save