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

111111111111111111

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