|
@@ -36,7 +36,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import * as interfaceApi from '@/api/device-manage.js'
|
|
|
|
|
import * as griderApi from '@/api/grider-erection'
|
|
import * as griderApi from '@/api/grider-erection'
|
|
|
const defaultSettings = require('@/settings.js')
|
|
const defaultSettings = require('@/settings.js')
|
|
|
// import ProjectSectionTree from '@/views/projects/components/ProjectSectionTree'
|
|
// import ProjectSectionTree from '@/views/projects/components/ProjectSectionTree'
|
|
@@ -149,154 +148,8 @@ export default {
|
|
|
.finally(() => {
|
|
.finally(() => {
|
|
|
this.listLoading = false
|
|
this.listLoading = false
|
|
|
})
|
|
})
|
|
|
- },
|
|
|
|
|
- // nodeClick(beamCode) {
|
|
|
|
|
- // this.listQuery.beamCode = beamCode
|
|
|
|
|
- // this.getList()
|
|
|
|
|
- // },
|
|
|
|
|
- // 查询
|
|
|
|
|
- handleFilter() {
|
|
|
|
|
- this.listQuery.skipCount = 0
|
|
|
|
|
- this.getList()
|
|
|
|
|
- },
|
|
|
|
|
- // 创建清空
|
|
|
|
|
- resetStation() {
|
|
|
|
|
- this.entity = {
|
|
|
|
|
- id: undefined,
|
|
|
|
|
- projectId: this.listQuery.projectId,
|
|
|
|
|
- sectionId: this.listQuery.sectionId,
|
|
|
|
|
- sectionAreaId: this.listQuery.sectionAreaId,
|
|
|
|
|
- deviceNo: '',
|
|
|
|
|
- deviceName: '',
|
|
|
|
|
- category: undefined,
|
|
|
|
|
- categoryName: '',
|
|
|
|
|
- spec: '',
|
|
|
|
|
- madeFactory: '',
|
|
|
|
|
- driverName: '',
|
|
|
|
|
- telephone: '',
|
|
|
|
|
- deviceType: undefined
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- // 创建点击事件
|
|
|
|
|
- handleCreate() {
|
|
|
|
|
- if (!this.listQuery.sectionId) {
|
|
|
|
|
- this.verificationTips('请选择标段')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.resetStation()
|
|
|
|
|
- this.dialogStatus = 'create'
|
|
|
|
|
- this.dialogFormVisible = true
|
|
|
|
|
- this.formLoading = false
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs['dataForm'].clearValidate()
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 提示
|
|
|
|
|
- verificationTips(message) {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: message,
|
|
|
|
|
- type: 'error',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 创建
|
|
|
|
|
- createData() {
|
|
|
|
|
- this.$refs['dataForm'].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- if (this.entity.deviceType === 1) {
|
|
|
|
|
- this.entity.categoryName = this.jqjTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
- if (this.entity.deviceType === 2) {
|
|
|
|
|
- this.entity.categoryName = this.ylcTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
- this.formLoading = true
|
|
|
|
|
- interfaceApi
|
|
|
|
|
- .create(this.entity)
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.getList()
|
|
|
|
|
- this.dialogFormVisible = false
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '成功',
|
|
|
|
|
- message: '创建成功',
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- .finally(() => {
|
|
|
|
|
- this.formLoading = false
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 修改点击事件
|
|
|
|
|
- handleUpdate(row) {
|
|
|
|
|
- const { href } = this.$router.resolve({ path: '/gride-work-info', query: { workSiteId: 27018 }})
|
|
|
|
|
- window.open(href, '_blank')
|
|
|
|
|
- // this.entity = Object.assign({}, row) // copy obj
|
|
|
|
|
- // this.dialogStatus = 'update'
|
|
|
|
|
- // this.dialogFormVisible = true
|
|
|
|
|
- // this.formLoading = false
|
|
|
|
|
- // this.$nextTick(() => {
|
|
|
|
|
- // this.$refs['dataForm'].clearValidate()
|
|
|
|
|
- // })
|
|
|
|
|
- },
|
|
|
|
|
- // 修改
|
|
|
|
|
- updateData() {
|
|
|
|
|
- this.$refs['dataForm'].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- if (this.entity.deviceType === 1) {
|
|
|
|
|
- this.entity.categoryName = this.jqjTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
- if (this.entity.deviceType === 2) {
|
|
|
|
|
- this.entity.categoryName = this.ylcTypes.find(t => t.code === this.entity.category).name
|
|
|
|
|
- }
|
|
|
|
|
- const submitData = Object.assign({}, this.entity)
|
|
|
|
|
- this.formLoading = true
|
|
|
|
|
- interfaceApi
|
|
|
|
|
- .update(submitData.id, submitData)
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.getList()
|
|
|
|
|
- this.dialogFormVisible = false
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '成功',
|
|
|
|
|
- message: '修改成功',
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- .finally(() => {
|
|
|
|
|
- this.formLoading = false
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 删除
|
|
|
|
|
- handleDelete(row) {
|
|
|
|
|
- const { href } = this.$router.resolve({ path: '/beam-carrier-work-info', query: { workSiteId: 27018 }})
|
|
|
|
|
- window.open(href, '_blank')
|
|
|
|
|
- // this.$confirm('此操作将删除该项, 是否继续?', '提示', {
|
|
|
|
|
- // confirmButtonText: '确定',
|
|
|
|
|
- // cancelButtonText: '取消',
|
|
|
|
|
- // type: 'warning'
|
|
|
|
|
- // }).then(() => {
|
|
|
|
|
- // this.listLoading = true
|
|
|
|
|
- // interfaceApi
|
|
|
|
|
- // .remove(row.id)
|
|
|
|
|
- // .then(() => {
|
|
|
|
|
- // this.getList()
|
|
|
|
|
- // this.$notify({
|
|
|
|
|
- // title: '成功',
|
|
|
|
|
- // message: '删除成功',
|
|
|
|
|
- // type: 'success',
|
|
|
|
|
- // duration: 2000
|
|
|
|
|
- // })
|
|
|
|
|
- // })
|
|
|
|
|
- // .finally(() => {
|
|
|
|
|
- // this.listLoading = false
|
|
|
|
|
- // })
|
|
|
|
|
- // })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|