Commit 8b1299a3 authored by 赵啸非's avatar 赵啸非

111111111111111111

parent d5348da1
......@@ -46,7 +46,7 @@ export function roleList(query) {
// 通过modelId读取xml文件
export function readXmlByModelId(modelId) {
return normalCallPost('/platform/modelinfo/view', {id:[modelId]})
return normalCallPost('/platform/modelinfo/view?id='+modelId, {id:modelId})
}
......@@ -88,7 +88,7 @@ export function addDeployment(data) {
export function updateDeployment(data) {
return new Promise((resolve, reject)=>{
this.$post('/flowable/definition/edit', {"query.id": data.deployId}).then(({data})=>{
this.$post('/flowable/definition/edit', {"id": data.deployId}).then(({data})=>{
resolve(data.result);
}).catch(reject)
})
......@@ -98,7 +98,7 @@ export function updateDeployment(data) {
export function delDeployment(query) {
// /{id:[formId]}
return normalCallPost('/flowable/definition/deleteDefinition', {deployId:[query.deployId]})
return normalCallPost('/flowable/definition/deleteDefinition', {deployId:[deployId]})
// return request({
// url: '/flowable/definition/delete/',
// method: 'delete',
......
......@@ -62,7 +62,6 @@ export default {
data() {
return {
form: {
entity: {
id: null,
name: "",
modelId: "",
......@@ -70,8 +69,7 @@ export default {
modelKey: "",
status:"1",
platformSn: "",
bpmnXml: "",
},
bpmnXml: ""
},
breadcrumbList: [
{ name: "流程管理", path: "" },
......@@ -102,7 +100,7 @@ export default {
}
console.log(platformSn);
this.form.entity.platformSn = platformSn;
this.form.platformSn = platformSn;
// const deployId = this.$route.query && this.$route.query.deployId;
// // 查询流程xml
// if (deployId) {
......@@ -122,7 +120,7 @@ export default {
// 发送请求,获取xml
readXmlByModelId(modelId).then((res) => {
console.log(res);
this.form.entity = Object.assign({}, this.form.entity, res.data.entity);
this.form = Object.assign({}, this.form, res.data.entity);
console.log(this.form);
//this.form.entity.id=data.entity.id
this.xml = res.data.entity.bpmnXml;
......@@ -144,9 +142,9 @@ export default {
save(data) {
console.log("保存xml",data);
this.form.entity.name = data.process.name;
this.form.entity.processDefinitionKey=data.process.id;
this.form.entity.bpmnXml = data.xml;
this.form.name = data.process.name;
this.form.processDefinitionKey=data.process.id;
this.form.bpmnXml = data.xml;
this.$post("/platform/modelinfo/save", this.form)
.then((res) => {
this.$message.success(res.msg);
......
......@@ -45,7 +45,7 @@
将文件拖到此处,或
<em>点击上传</em>
</div>
<div class="el-upload__tip" style="color: red" slot="tip">
提示:仅允许导入“bpmn20.xml”格式文件!
</div>
......@@ -77,19 +77,23 @@ export default {
components: {},
mixins: [table],
created() {
console.log("query",this.$route.query)
const { platformSn,id } = this.$route.query;
this.config.addQuery = { platformSn: platformSn };
this.query = { "query.platformSn": platformSn };
console.log("platformSn"+platformSn)
this.platformSn=platformSn
this.config.addQuery = { "platformSn": platformSn };
this.query = { "platformSn": platformSn };
},
methods: {
addFlow(row) {
this.$router.push({
path: "/flowable/definition/model",
query: { platformSn: this.$route.query.platformSn, id: row.id },
query: { platformSn: this.platformSn, id: row.id },
});
},
toEditFlow(row) {
console.log("编辑")
this.$router.push({
path: "/flowable/definition/model",
query: { id: row.id },
......@@ -97,7 +101,8 @@ export default {
},
toDeploy(row) {
this.$post("/platform/modelinfo/deployFlowByXml", { id: row.id })
console.log("row",row)
this.$post("/platform/modelinfo/deployFlowByXml?id="+row.id, { id: row.id })
.then((res) => {
console.log(res);
this.getData();
......@@ -107,6 +112,18 @@ export default {
});
},
toStop(row) {
console.log("row",row)
this.$post("/platform/modelinfo/deployFlowByXml?id="+row.id, { id: row.id })
.then((res) => {
console.log(res);
this.getData();
})
.catch((error) => {
this.$message.error(error.message);
});
},
/** 导入bpmn.xml文件 */
handleImport() {
this.upload.title = "bpmn20.xml文件导入";
......@@ -137,6 +154,7 @@ export default {
open: false,
src: "",
},
platformSn:null,
open: false,
upload: {
// 是否显示弹出层(xml导入)
......@@ -165,7 +183,7 @@ export default {
{ label: "创建用户名称", prop: "createUserName" },
{ label: "创建时间", prop: "createTime", formatter: this.formatterDate },
{
label: "操作",
width: 280,
......@@ -213,4 +231,4 @@ export default {
};
},
};
</script>
\ No newline at end of file
</script>
......@@ -12,10 +12,11 @@ module.exports = {
lintOnSave:false,
devServer: {
disableHostCheck: true,
port: 8081,
port: 8089,
hot: true,//自动保存
proxy: {
'/m': {
//target: 'http://127.0.0.1:18011',
target: 'http://192.168.0.250:18011',
changeOrigin: true,
secure: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment