|
@@ -4,19 +4,14 @@
|
|
|
<el-col :span="24">
|
|
|
<el-card class="box-card">
|
|
|
<div slot="header">
|
|
|
- <span>{{$t('process.processList')}}</span>
|
|
|
+ <span>{{ $t('process.processList') }}</span>
|
|
|
</div>
|
|
|
- <test ref="req" v-model="req" :form-config="queryForm"></test>
|
|
|
-
|
|
|
+ <from-render ref="req" v-model="req" :form-config="queryForm"></from-render>
|
|
|
+
|
|
|
<el-table :data="tableList" v-loading="loading">
|
|
|
<el-table-column :label="$t('process.generalProcess.serviceName')" align="center" prop="serviceName" />
|
|
|
<el-table-column :label="$t('process.generalProcess.moduleName')" align="center" prop="moduleName" />
|
|
|
<el-table-column :label="$t('process.generalProcess.codeName')" align="center" prop="code" />
|
|
|
- <!-- <el-table-column :label="$t('operation')" align="center" width="80">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" @click="handleDelete(scope.row)">{{ $t('delete') }} </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
</el-table>
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="req.pageNum" :limit.sync="req.pageSize" @pagination="getList" />
|
|
|
<el-dialog :title="$t('process.generalProcess.add')" :visible.sync="open" width="30%">
|
|
@@ -27,6 +22,7 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
<script>
|
|
|
import * as API from '@/api/process/generalProcess.js'
|
|
|
import fromRender from '@/components/form-test/index.vue'
|
|
@@ -36,14 +32,13 @@ export default {
|
|
|
components: { fromRender },
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
req: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
keyword: '',
|
|
|
serviceName: '',
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
queryForm: {
|
|
|
keyword: {
|
|
|
label: this.$t('keyword'),
|
|
@@ -97,7 +92,7 @@ export default {
|
|
|
loadingStatus: false,
|
|
|
serviceName: {
|
|
|
label: this.$t('process.generalProcess.serviceName'),
|
|
|
- type: 'select',
|
|
|
+ type: 'input',
|
|
|
data: [],
|
|
|
keyName: 'id',
|
|
|
labelName: 'name',
|
|
@@ -106,14 +101,14 @@ export default {
|
|
|
label: this.$t('process.generalProcess.moduleName'),
|
|
|
type: 'input',
|
|
|
},
|
|
|
+ code: {
|
|
|
+ label: this.$t('process.generalProcess.code'),
|
|
|
+ type: 'input',
|
|
|
+ },
|
|
|
flowName: {
|
|
|
label: this.$t('process.generalProcess.flowName'),
|
|
|
type: 'input',
|
|
|
},
|
|
|
- code: {
|
|
|
- label: this.$t('process.generalProcess.code'),
|
|
|
- span: 2,
|
|
|
- },
|
|
|
otherButton: {
|
|
|
align: 'center',
|
|
|
list: [
|
|
@@ -145,38 +140,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- //this.getSelectList()
|
|
|
+ this.getServiceNameList()
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList()
|
|
|
- this.getServiceNameList()
|
|
|
- },
|
|
|
- watch: {
|
|
|
-
|
|
|
},
|
|
|
+ watch: {},
|
|
|
methods: {
|
|
|
- getServiceNameList(){
|
|
|
- API.getServiceNameList({}).then(
|
|
|
- (res) => {
|
|
|
- const listData = []
|
|
|
- for (let i = 0; i < res.data.data.length; i++) {
|
|
|
- const element = res.data.data[i];
|
|
|
- listData.push({
|
|
|
- name:element,
|
|
|
- id:element
|
|
|
- })
|
|
|
- }
|
|
|
- this.dialogForm.serviceName.data = listData
|
|
|
- this.queryForm.serviceName.data = listData
|
|
|
- },
|
|
|
-
|
|
|
- )
|
|
|
- },
|
|
|
- reload(row){
|
|
|
- console.log(row)
|
|
|
- this.req.pageNum = 1
|
|
|
- this.req.classifyId = row.id
|
|
|
- this.getList()
|
|
|
+ getServiceNameList() {
|
|
|
+ API.getServiceNameList({}).then((res) => {
|
|
|
+ const listData = []
|
|
|
+ for (let i = 0; i < res.data.data.length; i++) {
|
|
|
+ const element = res.data.data[i]
|
|
|
+ listData.push({
|
|
|
+ name: element,
|
|
|
+ id: element,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // this.dialogForm.serviceName.data = listData
|
|
|
+ this.queryForm.serviceName.data = listData
|
|
|
+ })
|
|
|
},
|
|
|
getList() {
|
|
|
this.loading = true
|
|
@@ -187,7 +170,7 @@ export default {
|
|
|
this.loading = false
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log('tdaDevicePage: ' + err)
|
|
|
+ console.log('page: ' + err)
|
|
|
this.loading = false
|
|
|
},
|
|
|
)
|
|
@@ -203,40 +186,23 @@ export default {
|
|
|
this.open = false
|
|
|
this.dialogForm.loadingStatus = false
|
|
|
this.getList()
|
|
|
+ this.getServiceNameList()
|
|
|
},
|
|
|
(err) => {
|
|
|
console.log('tdaDeviceAdd: ' + err)
|
|
|
this.dialogForm.loadingStatus = false
|
|
|
},
|
|
|
)
|
|
|
- // } else {
|
|
|
- // setTimeout(() => {
|
|
|
- // const errorDiv = document.getElementsByClassName('is-error')
|
|
|
- // errorDiv[0].scrollIntoView()
|
|
|
- // }, 0)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- handleDelete(row) {
|
|
|
- this.$confirm(this.$t('askDeleteData'), {
|
|
|
- confirmButtonText: this.$t('submitText'),
|
|
|
- cancelButtonText: this.$t('cancelText'),
|
|
|
- type: 'warning',
|
|
|
- }).then(() => {
|
|
|
- API.dlt({ id: row.id }).then(() => {
|
|
|
- this.msgSuccess(this.$t('deleteSuccess'))
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
-
|
|
|
+
|
|
|
+ <style lang="scss" scoped>
|
|
|
.box-card {
|
|
|
- height: calc(100vh - 110px);
|
|
|
+ height: calc(100vh - 60px);
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|