|
@@ -3,217 +3,147 @@
|
|
<div>
|
|
<div>
|
|
<template v-if="!addOrUpdateVisible && !detailVisible">
|
|
<template v-if="!addOrUpdateVisible && !detailVisible">
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
|
|
- <el-form-item label="项目/任务号">
|
|
|
|
- <el-input v-model="dataForm.orderCode" placeholder="" clearable/>
|
|
|
|
|
|
+ <el-form-item label="名称">
|
|
|
|
+ <el-input v-model="dataForm.name" placeholder="" clearable />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button @click="queryData()">查询</el-button>
|
|
<el-button @click="queryData()">查询</el-button>
|
|
<el-button type="primary" @click="addOrUpdateHandle(0, false)">新增</el-button>
|
|
<el-button type="primary" @click="addOrUpdateHandle(0, false)">新增</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table
|
|
|
|
- :data="dataList"
|
|
|
|
- border
|
|
|
|
- v-loading="dataListLoading"
|
|
|
|
- style="width: 100%;">
|
|
|
|
- <el-table-column
|
|
|
|
- label="序号"
|
|
|
|
- type="index"
|
|
|
|
- width="50"
|
|
|
|
- align="center">
|
|
|
|
|
|
+ <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
|
|
|
|
+ <el-table-column label="序号" type="index" width="50" align="center">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="projectName"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- min-width="140"
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
- label="项目名称">
|
|
|
|
|
|
+ <el-table-column prop="name" header-align="center" align="center" min-width="140"
|
|
|
|
+ :show-tooltip-when-overflow="true" label="名称">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="orderCode"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- min-width="160"
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
- label="任务号">
|
|
|
|
|
|
+ <el-table-column prop="description" header-align="center" align="center" min-width="160"
|
|
|
|
+ :show-tooltip-when-overflow="true" label="描述">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="attachList"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
- label="技术协议"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button
|
|
|
|
- :disabled="
|
|
|
|
- !scope.row.attachList || scope.row.attachList.length === 0
|
|
|
|
- "
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- @click="attachDetails(scope.row.attachList)"
|
|
|
|
- >查看</el-button
|
|
|
|
- >
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="attachList1"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
- label="技术文件"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button
|
|
|
|
- :disabled="
|
|
|
|
- !scope.row.attachList1 || scope.row.attachList1.length === 0
|
|
|
|
- "
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- @click="attachDetails(scope.row.attachList1)"
|
|
|
|
- >查看</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="workshopManager" header-align="center" align="center" min-width="120"
|
|
|
|
+ :show-tooltip-when-overflow="true" label="主管">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ scope.row.workshopManagerName }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="notes"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
|
|
+ <el-table-column prop="notes" header-align="center" align="center" :show-tooltip-when-overflow="true"
|
|
label="备注">
|
|
label="备注">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="createTime"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- min-width="120"
|
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
|
- label="创建时间">
|
|
|
|
|
|
+ <el-table-column prop="createTime" header-align="center" align="center" min-width="120"
|
|
|
|
+ :show-tooltip-when-overflow="true" label="创建时间">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- fixed="right"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- width="150"
|
|
|
|
- label="操作">
|
|
|
|
|
|
+ <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="small" @click="detailHandle(scope.row)">查看</el-button>
|
|
|
|
- <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row, false)">编辑</el-button>
|
|
|
|
|
|
+ <el-button type="text" size="small" @click="detailHandle(scope.row.proWorkshopId)">查看</el-button>
|
|
|
|
+ <el-button type="text" size="small"
|
|
|
|
+ @click="addOrUpdateHandle(scope.row.proWorkshopId, false)">编辑</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <el-pagination
|
|
|
|
- @size-change="sizeChangeHandle"
|
|
|
|
- @current-change="currentChangeHandle"
|
|
|
|
- :current-page="pageIndex"
|
|
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
|
|
- :page-size="pageSize"
|
|
|
|
- :total="totalPage"
|
|
|
|
|
|
+ <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
|
|
|
|
+ :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</template>
|
|
</template>
|
|
<!-- 弹窗, 新增 / 修改 -->
|
|
<!-- 弹窗, 新增 / 修改 -->
|
|
- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @onChose="onChose"></add-or-update>
|
|
|
|
- <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
|
|
|
|
-
|
|
|
|
|
|
+ <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"
|
|
|
|
+ @onChose="onChose"></add-or-update>
|
|
|
|
+ <detail v-if="detailVisible" ref="detail" @onChose="onChose" />
|
|
<attach-detail-dialog ref="attachDetail" @onChose="onChose" />
|
|
<attach-detail-dialog ref="attachDetail" @onChose="onChose" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import AddOrUpdate from './workshop-add-or-update'
|
|
|
|
- import Detail from './file-manage-detail'
|
|
|
|
- import { getList } from '@/api/workshop'
|
|
|
|
- import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
|
- export default {
|
|
|
|
- name: 'workshop-manage',
|
|
|
|
- components: {
|
|
|
|
- AddOrUpdate, Detail, AttachDetailDialog
|
|
|
|
|
|
+import AddOrUpdate from './workshop-add-or-update'
|
|
|
|
+import Detail from './workshop-detail'
|
|
|
|
+import { getList } from '@/api/workshop'
|
|
|
|
+import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
|
+export default {
|
|
|
|
+ name: 'workshop-manage',
|
|
|
|
+ components: {
|
|
|
|
+ AddOrUpdate, Detail, AttachDetailDialog
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ addOrUpdateVisible: false,
|
|
|
|
+ detailVisible: false,
|
|
|
|
+ dataForm: {},
|
|
|
|
+ dataList: [],
|
|
|
|
+ pageIndex: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ totalPage: 0,
|
|
|
|
+ dataListLoading: false,
|
|
|
|
+ dataListSelections: [],
|
|
|
|
+ optionsLevel: []
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getDataList()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ onChose() {
|
|
|
|
+ this.addOrUpdateVisible = false
|
|
|
|
+ this.detailVisible = false
|
|
|
|
+ },
|
|
|
|
+ // 查询
|
|
|
|
+ queryData() {
|
|
|
|
+ this.pageIndex = 1
|
|
|
|
+ this.getDataList()
|
|
},
|
|
},
|
|
- data () {
|
|
|
|
- return {
|
|
|
|
- addOrUpdateVisible: false,
|
|
|
|
- detailVisible: false,
|
|
|
|
- dataForm: {},
|
|
|
|
- dataList: [],
|
|
|
|
- pageIndex: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- totalPage: 0,
|
|
|
|
- dataListLoading: false,
|
|
|
|
- dataListSelections: [],
|
|
|
|
- optionsLevel: []
|
|
|
|
|
|
+ // 获取数据列表
|
|
|
|
+ getDataList() {
|
|
|
|
+ this.dataListLoading = true
|
|
|
|
+ this.addOrUpdateVisible = false
|
|
|
|
+ let params = {
|
|
|
|
+ 'current': this.pageIndex,
|
|
|
|
+ 'size': this.pageSize,
|
|
|
|
+ 'name': this.dataForm.name ? this.dataForm.name : null
|
|
}
|
|
}
|
|
|
|
+ getList(params).then(({ data }) => {
|
|
|
|
+ if (data && data.code === '200') {
|
|
|
|
+ this.dataList = data.data.records
|
|
|
|
+ this.totalPage = Number(data.data.total)
|
|
|
|
+ } else {
|
|
|
|
+ this.dataList = []
|
|
|
|
+ this.totalPage = 0
|
|
|
|
+ }
|
|
|
|
+ this.dataListLoading = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- created () {
|
|
|
|
|
|
+ // 每页数
|
|
|
|
+ sizeChangeHandle(val) {
|
|
|
|
+ this.pageSize = val
|
|
|
|
+ this.pageIndex = 1
|
|
this.getDataList()
|
|
this.getDataList()
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
- onChose () {
|
|
|
|
- this.addOrUpdateVisible = false
|
|
|
|
- this.detailVisible = false
|
|
|
|
- },
|
|
|
|
- // 查询
|
|
|
|
- queryData () {
|
|
|
|
- this.pageIndex = 1
|
|
|
|
- this.getDataList()
|
|
|
|
- },
|
|
|
|
- // 获取数据列表
|
|
|
|
- getDataList () {
|
|
|
|
- this.dataListLoading = true
|
|
|
|
- this.addOrUpdateVisible = false
|
|
|
|
- let params = {
|
|
|
|
- 'current': this.pageIndex,
|
|
|
|
- 'size': this.pageSize,
|
|
|
|
- 'orderCode': this.dataForm.orderCode ? this.dataForm.orderCode : null
|
|
|
|
- }
|
|
|
|
- getList(params).then(({data}) => {
|
|
|
|
- if (data && data.code === '200') {
|
|
|
|
- this.dataList = data.data.records
|
|
|
|
- this.totalPage = Number(data.data.total)
|
|
|
|
- } else {
|
|
|
|
- this.dataList = []
|
|
|
|
- this.totalPage = 0
|
|
|
|
- }
|
|
|
|
- this.dataListLoading = false
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 每页数
|
|
|
|
- sizeChangeHandle (val) {
|
|
|
|
- this.pageSize = val
|
|
|
|
- this.pageIndex = 1
|
|
|
|
- this.getDataList()
|
|
|
|
- },
|
|
|
|
- // 当前页
|
|
|
|
- currentChangeHandle (val) {
|
|
|
|
- this.pageIndex = val
|
|
|
|
- this.getDataList()
|
|
|
|
- },
|
|
|
|
- // 多选
|
|
|
|
- selectionChangeHandle (val) {
|
|
|
|
- this.dataListSelections = val
|
|
|
|
- },
|
|
|
|
- // 新增 / 修改
|
|
|
|
- addOrUpdateHandle (item, disable) {
|
|
|
|
- this.addOrUpdateVisible = true
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.$refs.addOrUpdate.init(item, disable)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 详情
|
|
|
|
- detailHandle (item) {
|
|
|
|
- this.detailVisible = true
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.$refs.detail.init(item)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- attachDetails (attachList) {
|
|
|
|
- this.$refs.attachDetail.init(attachList)
|
|
|
|
- }
|
|
|
|
|
|
+ // 当前页
|
|
|
|
+ currentChangeHandle(val) {
|
|
|
|
+ this.pageIndex = val
|
|
|
|
+ this.getDataList()
|
|
|
|
+ },
|
|
|
|
+ // 多选
|
|
|
|
+ selectionChangeHandle(val) {
|
|
|
|
+ this.dataListSelections = val
|
|
|
|
+ },
|
|
|
|
+ // 新增 / 修改
|
|
|
|
+ addOrUpdateHandle(id, disable) {
|
|
|
|
+ this.addOrUpdateVisible = true
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.addOrUpdate.init(id, disable)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 详情
|
|
|
|
+ detailHandle(id) {
|
|
|
|
+ this.detailVisible = true
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.detail.init(id)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ attachDetails(attachList) {
|
|
|
|
+ this.$refs.attachDetail.init(attachList)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
|
-
|
|
|
|
-</style>
|
|
|
|
|
|
+<style scoped></style>
|