|
@@ -68,41 +68,27 @@
|
|
|
<el-button type="primary" @click="handleSave" :disabled="flag" size="small">保存</el-button>
|
|
|
</div>
|
|
|
<div class="demo-form">
|
|
|
- <PublicPageForm :form-item="jqList" :formData="dataObj" labelWidth="200px" form-type="horizontal" />
|
|
|
+ <PublicPageForm ref="rulesForm" :form-item="jqList" :formData="dataObj" labelWidth="200px" form-type="horizontal" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height: calc(100% - 280px);overflow: hidden;" class="newService-content-right-bottom">
|
|
|
- <Table :dataId="dataId" :msgContent="msgContent" dataTitle="算法配置" />
|
|
|
+ <PublicPageTable :dataId="dataId" :msgContent="msgContent" dataTitle="算法配置" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Dialog :flag="rmFlag">
|
|
|
- <div class="airportInfoDialog">
|
|
|
- <div class="title del-title">删除</div>
|
|
|
- <div class="content del-content">
|
|
|
- <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ dataObj.serviceName }}</span>
|
|
|
- ?
|
|
|
- </div>
|
|
|
- <div class="foot right Delfoot">
|
|
|
- <el-button size="medium" class="r24" @click="tableRemove" type="danger">删除</el-button>
|
|
|
- <el-button size="medium" @click="rmFlag = false">取消</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Table from '@/views/tablePage/index.vue'
|
|
|
+import PublicPageTable from '@/views/tablePage'
|
|
|
+import PublicPageDialog from '@/components/PublicPageDialog'
|
|
|
import PublicPageForm from '@/components/publicPageForm'
|
|
|
-import Dialog from "@/layout/components/Dialog/index.vue"
|
|
|
import { Query, newData, modifyData, moveData, start, stop } from "@/api/webApi"
|
|
|
-import pf from '@/layout/mixin/publicFunc'
|
|
|
import * as _ from 'lodash'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'NewService',
|
|
|
- mixins: [pf],
|
|
|
- components: { Table, Dialog, PublicPageForm },
|
|
|
+ components: { PublicPageForm, PublicPageDialog, PublicPageTable },
|
|
|
data () {
|
|
|
return {
|
|
|
title: '服务设置',
|
|
@@ -122,16 +108,6 @@ export default {
|
|
|
tasktype: '',
|
|
|
cronexpress: ''
|
|
|
},
|
|
|
- servicetype: [
|
|
|
- {
|
|
|
- label: '接收',
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: '采集',
|
|
|
- value: 4
|
|
|
- }
|
|
|
- ],
|
|
|
activeIndex: null,
|
|
|
pageIndex: 0,
|
|
|
pageSize: 9999,
|
|
@@ -153,11 +129,6 @@ export default {
|
|
|
dataList () {
|
|
|
return this.arrs.filter(data => !this.search || data.servicename.toLowerCase().includes(this.search.toLowerCase()))
|
|
|
},
|
|
|
- checkStatus () {
|
|
|
- return function (formInline) {
|
|
|
- return (formInline.servicetype && formInline.tasktype) || (formInline.servicetype && formInline.tasktype == 0) ? false : true
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
created () {
|
|
|
const { title, qid } = this.$route.meta
|
|
@@ -236,35 +207,14 @@ export default {
|
|
|
},
|
|
|
//服务列表-新增
|
|
|
handleAdd () {
|
|
|
- const datas = this.arrs.filter(item => item.serviceName == '新建服务')
|
|
|
- if (datas && datas.length) {
|
|
|
- return
|
|
|
- }
|
|
|
this.dataType = 'add'
|
|
|
- this.flag = false
|
|
|
- this.dataObj.serviceName = '新建服务'
|
|
|
- this.arrs.push({ serviceName: '新建服务' })
|
|
|
- this.activeIndex = this.arrs.length - 1
|
|
|
- for (const key in this.formInline) {
|
|
|
- if (Object.hasOwnProperty.call(this.formInline, key)) {
|
|
|
- this.formInline[key] = null
|
|
|
- }
|
|
|
- }
|
|
|
- this.msgContent = {
|
|
|
- service_id: ''
|
|
|
- }
|
|
|
},
|
|
|
//服务列表-点击
|
|
|
handleClick (item, index) {
|
|
|
this.dataType = 'edit'
|
|
|
this.dataObj = _.cloneDeep(item)
|
|
|
- this.formInline = _.cloneDeep(item)
|
|
|
this.activeIndex = index
|
|
|
this.flag = false
|
|
|
- this.msgContent = {
|
|
|
- serviceid: '15',
|
|
|
- pagecode: 'algorithmlibraryManagementTable'
|
|
|
- }
|
|
|
},
|
|
|
//服务列表-启用
|
|
|
handleStart () {
|
|
@@ -298,6 +248,8 @@ export default {
|
|
|
},
|
|
|
//服务列表-保存
|
|
|
handleSave () {
|
|
|
+ console.log(this.$refs['rulesForm'].tableForm)
|
|
|
+ return
|
|
|
if (this.dataObj.serviceID && this.dataType == 'edit') {
|
|
|
const obj = {}
|
|
|
obj.Value = this.formInline
|